Re: Mesen Debugger - Feedback/Feature Requests? (2018 edition)
Posted: Thu Apr 16, 2020 3:40 am
Pardon me if this is necro-bumping an old thread. But a feature I am really missing whilst debugging NES code is the ability to do asserts to check registers / memory values.
Adding them using macros to generate code is certainly an option, but it'll increase code size and potentially make branch labels out-of-range as well. It would be far more preferable to have a macro that only changes how the debugger reacts, rather than changing any code.
Seeing how Mesen's debugger already has the ability to:
1. Read CA65 source assembly / .dbg files and associate disassembly with source code
2. Set conditions for breakpoints
...I am thinking the ability to trigger conditional breakpoints based on comments should be relatively easy to add?
Something like this:
Adding them using macros to generate code is certainly an option, but it'll increase code size and potentially make branch labels out-of-range as well. It would be far more preferable to have a macro that only changes how the debugger reacts, rather than changing any code.
Seeing how Mesen's debugger already has the ability to:
1. Read CA65 source assembly / .dbg files and associate disassembly with source code
2. Set conditions for breakpoints
...I am thinking the ability to trigger conditional breakpoints based on comments should be relatively easy to add?

Something like this:
Code: Select all
ldx MyIndex ; MESEN_DEBUG_ASSERT(X < 10) - check that index is in range
; MESEN_DEBUG_ASSERT([MyPointer] >= $8000) - check that pointer references ROM