Mesen - Debugger Feedback?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

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

Re: Mesen - Debugger Feedback?

Post by Oziphantom » Thu Apr 20, 2017 3:41 am

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: 745
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - Debugger Feedback?

Post by Sour » Sat Apr 22, 2017 11:22 am

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: 776
Joined: Tue Feb 07, 2017 2:03 am

Re: Mesen - Debugger Feedback?

Post by Oziphantom » Mon May 01, 2017 8:31 am

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: 745
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - Debugger Feedback?

Post by Sour » Mon May 01, 2017 1:54 pm

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: 776
Joined: Tue Feb 07, 2017 2:03 am

Re: Mesen - Debugger Feedback?

Post by Oziphantom » Mon May 01, 2017 10:12 pm

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: 745
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - Debugger Feedback?

Post by Sour » Sun May 14, 2017 10:32 am

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