Mesen - Debugger Feedback?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Mesen - Debugger Feedback?

Post by Oziphantom »

It is really hard to get the debugger to stop based upon an input and sequence of inputs, as I can't invoke the functions from the emulator window. Ctrl + Break will stop code flow but only the debugger is the focus window. Also Ctrl + break, can't just have break?
Then I'm trying to set the joypad input data to something, and step in over etc in code, but oh no the wrong window has focus and I press F8 and it loads a save state trashing my debug session as the main window not the debugger had focus so I can press Up. Is it possible when in the debugger to lock the Debuggers function keys to be trapped by the debugger and not do "emulator" based tasks? Or even have the ability to directly manipulate the controller in the debug screen so I can step through code with specific joypad data?
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - Debugger Feedback?

Post by Sour »

Yea, this is something rainwarrior had mentioned before, and something I find annoying at times too.
I think the main problem is just the F1-F12 key shortcuts - maybe those specifically could be ignored in the main window and redirected to the debugger window when it is active? It would prevent loading save states by mistakes, which is really the number 1 problem. I could add break as a shortcut on the main window, too.

Having a way to "force" the controller input in the debugger is not a bad idea, I'll add it to the list.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Mesen - Debugger Feedback?

Post by Oziphantom »

I've just updated to 0.8.1 and stepping in the debugger is erratic. Sometimes I do step over and then after 4 or 5 steps it just runs until it hits another breakpoint, or steps into the end of a function that is called a couple of code lines down. Sometimes step into also just ends up running.
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - Debugger Feedback?

Post by Sour »

This is something I noticed and fixed yesterday, actually - the call stack is also bugged because of it.
What version were you using before? As far as I can tell, I broke this when I implemented the option to break on "BRK" and unofficial opcodes, in 0.8.0.

It'll be fixed in the next release - the meantime you can use the older version if you need it (you can download it on the releases page on GitHub)
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Mesen - Debugger Feedback?

Post by Oziphantom »

Probably 0.8.0 but before I was mostly hit break points and run, with my debugging, rather than stepping through the logic.
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - Debugger Feedback?

Post by Sour »

The step over/into issues in the debugger are fixed in 0.9.0 - sorry for the wait!
Let me know if you find any other issues.
Post Reply