MD Debugger and Error Handler (v.2.6 update)

Discussion in 'Utilities' started by vladikcomper, Apr 5, 2016.

  1. fuzzy

    fuzzy Inconsistent Member

    Joined:
    Oct 30, 2022
    Messages:
    13
    I've been using in-development versions of this in my hack, and it's helped me lots ever since the newer version was installed. Update your debugger, you won't regret!
     
    giovanni.gen and vladikcomper like this.
  2. JGamer2151

    JGamer2151 Happy Snake Year Y'all Member

    Joined:
    Dec 1, 2020
    Messages:
    113
    I’ve never even expected a new update of the error handler from the last version I’ve used for the past few years or so (I have been using v2.0 since then), it’s nice to see that it’s still alive in development! Can’t wait for a brand-new update on this error handler!

    Also btw, I have the pre-release version of this new error handler update on GitHub on a test ROM hack based on Sonic 2 and it works perfectly. Great drop-in replacement for the older version (2.0) with some minor changes to make it work.
     
    vladikcomper likes this.
  3. JGamer2151

    JGamer2151 Happy Snake Year Y'all Member

    Joined:
    Dec 1, 2020
    Messages:
    113
    (Sorry for the double-post)

    In regards to how it looks like on older Sonic 2 disassemblies (those with an older AS version), here's the screenshot: bandicam 2023-06-14 23-06-36-263.png
    To properly use the symbols with the correct case, case-sensitivity must be enabled in the build script. You may need to rename some labels in the disassembly afterwards (such as Mapunc_Sonic, etc.).
     
    Last edited: Jun 15, 2023
  4. JGamer2151

    JGamer2151 Happy Snake Year Y'all Member

    Joined:
    Dec 1, 2020
    Messages:
    113
    (Double-double posting in case vlad didn't update the thread for a new version)

    So a brand-new version of the Error Handler has finally been released after five years since the last one, and what time of effort it has been! Check it out here!

    I'm sure Vladikcomper will be able to make a post here once they have the time to do so, as I've just received an update from the GitHub page via email notifications. This is why I was able to do this post.

    And now I am implementing this new version into my own hacks that has the old version of the Error Handler. They should be compatible.
    Also, 69th post.
     
    Last edited: Jul 2, 2023
    Hame likes this.
  5. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    425
    Major update: Version 2.5 is here!
    - Stable AS support, Backtrace, debug logging, benchmarking and much more!

    NOTICE: The first post was also updated!

    [​IMG]

    It's sure been a while: over 5 years since version 2.0 release in 2018, but development was slowly but surely going~
    Remember how I few weeks ago I've posted that upon release, v.2.5 won't be a ground-breaking update? I lied. Sort of. During the last few weeks of development I managed to include more big features than I've initially planned.

    Feature highlights
    • Stable AS support
      • Better integration with AS projects, stable debug symbol extraction.
    • Backtrace, address registers analysis and custom built-in debuggers
      • On any exception screen, press B to display backtrace, A for address registers, Start to return;
      • You can map A/B/C buttons to your custom debuggers;
    • Log in-game events, benchmark code, breakpoint with KDebug integration
      • Blastem-nightly and Gens KMod allow you to log debug messages in emulator's console/window;
      • No side-effects on unsupported emulators and the real hardware.
    • Debugger now supports assertions.
    • ConvSym, the debug symbol extraction utility, is now fully cross-platform.
    • Slightly improved exception display, many QoL and stability improvements.
    See MD Debugger's version history for the detailed changelog.

    Version 2.0 to 2.5 migration guide

    If you were already using version 2.0, migration is really simple as the new version is 100% backwards compatible.
    1. Download the correct version for your project (errorhandler-as.7z or errorhandler-asm68k.7z).
    2. Replace the old files; remove ErrorHandler.bin from the old installation because it's now inlined into ErrorHandler.asm.
    3. Download and replace convsym utility for your platform:
    4. Everything should work already, but to support features like assertions and KDebug integration you need to modify your build system to generate DEBUG builds. Just find an installation guide for your disassembly and follow the "Install ConvSym to generate debug symbols" step.
    Installation guides, documentation and help

    MD Debugger comes with exhaustive documentation, installation guides and usage examples. See the following links for details:
     
    Last edited: Jul 2, 2023
  6. JGamer2151

    JGamer2151 Happy Snake Year Y'all Member

    Joined:
    Dec 1, 2020
    Messages:
    113
    Awesome new version. Already got this new version put in my own hacks replacing the old 2.0 version. This has been a well five years worth of wait! I've been using this error handler way back since version 2.0 came out in 2018, and I'm ecstatic that this new update has gone full-circle! Congrats!

    And this is my 70th post overall.
     
    Last edited: Jul 3, 2023
    vladikcomper likes this.
  7. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    425
    MD Debugger and Error Handler 2.6

    - AXM68K, Psylink and GAS support, better assertions, compact error handler offsets and tons of QoL improvements!


    [​IMG] [​IMG]

    MD Debugger 2.6 is finally out, including ~1.5 years worth of work, with tons of stability and QoL improvements! This release focuses on extending supported assemblers and improving the existing features: better asserts, compact offsets and displacements on error screens, KDebug integration is no longer experimental.

    Feature highlights
    • Official AXM68K and GAS support (allows SGDK integration), support for ASM68K projects using Psy-Q Linker.;
    • Error handler now uses compact offsets and symbol displacements: offsets are rendered as 24-bit instead of 32-bit and displacements don't have leading zeros (+000X is now +X);
    • Better assertions: you can now assign custom debuggers to failed assertions, assertion failed exception is improved and displays the received value;
    • KDebug integration is no longer experimental; you can use KDebug.Write[Line] in console programs;
    • Console.WriteLine, Console.Write, KDebug.WriteLine, KDebug.Write are now much faster when formatted string doesn't include any printable arguments;
    • Added _Console.*, _KDebug.*, _assert macros for advanced users ("shadow macros"): they behave like the original ones, but don't save/restore CCR as an optimization;
    • ASM68K version: Support projects that use "." for local labels, support projects with /o ae+ compile flag;
    • AS version: Support xxx.w, (xxx).w, xxx.l and (xxx).l syntax in formatted string arguments;
    • Many optimizations, bugfixes and stability improvements.
    Special thanks to @OrionNavattan for contributing a few optimizations and bugfixes for this release.

    See MD Debugger's version history for the detailed changelog.

    Version 2.5 to 2.6 migration guide
    If you were already using version 2.5, migration is as simple as upgrading your Debugger.asm and ErrorHandler.asm files from the bundle for your assembler and upgrading ConvSym utility. As usual, versions are 100% backwards-compatible.
    1. Download errorhandler-2.6.zip;
    2. Inside this archive, find the directory that matches your assembler (e.g. asm68k for ASM68K, as for the AS Macro Assembler);
    3. Replace Debugger.asm and ErrorHandler.asm files in your projects with ones from that directory;
    4. Download consym-2.12.1.zip, find executable for your platform (64-bit Windows or Linux) and replace one in your project;
    Installation guides, documentation and help
    MD Debugger comes with exhaustive documentation, installation guides and usage examples. See the following links for details:
     
    Last edited: Dec 17, 2024
    Mildanner, ProjectFM, Selbi and 5 others like this.
  8. SGAMERXD547

    SGAMERXD547 Newcomer Trialist

    Joined:
    Apr 1, 2025
    Messages:
    21
    [​IMG]

    I got this error while building what do i need to do?
    if the picture doesnt show up,

    Sonic.asm:end of file reached without completion of endm construct
    cnop 0,\1
    FATAL:Input file parsing failed: Couldn't open input file
    Lightning's ROM Padder

    And the other one(debug part)
    is the same
     
  9. PeanutNoceda

    PeanutNoceda In SR and SFHQ named as CupcakeLove76 Member

    Joined:
    Sep 26, 2024
    Messages:
    323
    Location:
    Somewhere in Peru
    Maybe this post its not really helpfull, but i think I know what is going on.
    Did you added the name right or you added the file?
    If you didnt added it then add the file, and check the name to include it.
    But if you writed the file name wrong, then copy the name of the file and replace the old name that you added in the include pasting the new one.
    I dont know if i explain myself.
     
  10. SGAMERXD547

    SGAMERXD547 Newcomer Trialist

    Joined:
    Apr 1, 2025
    Messages:
    21
    i did every step!
    including the asm files,the exe file,the batch file editing step but i didint do the step for fixing sega sound which,i fixed it so what am i doing wrong?I got the error after editing thr batch file
    Hivebrain 2005 disasm btw
     
  11. PeanutNoceda

    PeanutNoceda In SR and SFHQ named as CupcakeLove76 Member

    Joined:
    Sep 26, 2024
    Messages:
    323
    Location:
    Somewhere in Peru
    I mean, something like this:
    upload_2025-4-15_13-18-39.png
    Its same for Hivebrain disasm:
    upload_2025-4-15_13-20-12.png
     
  12. SGAMERXD547

    SGAMERXD547 Newcomer Trialist

    Joined:
    Apr 1, 2025
    Messages:
    21
    The same result :\
     
  13. SGAMERXD547

    SGAMERXD547 Newcomer Trialist

    Joined:
    Apr 1, 2025
    Messages:
    21
    I see that the problem is in theses lines just before the StartOfRom:
    align macro
    cnop 0,\1
    endm

    a message to AleDrawer2008:It didnt work,the same result :[

    edit:I CANT COMMENT ON THIS FORUM,IT SAYS "You have insufficient privileges to reply here."
     
    Last edited: Apr 15, 2025
  14. AleDrawer2008

    AleDrawer2008 Active Member Member

    Joined:
    Jun 14, 2021
    Messages:
    44
    Location:
    Somewhere in South America
    change the 1 to a 2
    thats it
     
    PeanutNoceda likes this.
  15. PeanutNoceda

    PeanutNoceda In SR and SFHQ named as CupcakeLove76 Member

    Joined:
    Sep 26, 2024
    Messages:
    323
    Location:
    Somewhere in Peru
    Can you show the code?
     
  16. SGAMERXD547

    SGAMERXD547 Newcomer Trialist

    Joined:
    Apr 1, 2025
    Messages:
    21
    Sonic.asm:end of file reached without completion of endm construct
    cnop 0,\1
    FATAL:Input file parsing failed: Couldn't open input file
    Lightning's ROM Padder

    And the other one(debug part)
    is the same

    (The problem is with the line 14 btw)
     
  17. SGAMERXD547

    SGAMERXD547 Newcomer Trialist

    Joined:
    Apr 1, 2025
    Messages:
    21
    This problem occurs after doing step 5 (batch editing)
     
  18. SGAMERXD547

    SGAMERXD547 Newcomer Trialist

    Joined:
    Apr 1, 2025
    Messages:
    21
    Nvm the problem is gone but theres a new error:

    "Debugger.asm"(157 line) end of file reached without completion of endm construct
    if dev (__debug__)
    FATAL:Input file parsing failed:couldnt open input file