SourMesen / Mesen

Mesen is a cross-platform (Windows & Linux) NES/Famicom emulator built in C++ and C#
https://www.mesen.ca
GNU General Public License v3.0
1.25k stars 317 forks source link

Debugger Feature Request -- Run to line function #824

Open MikeTheAardvark opened 4 years ago

MikeTheAardvark commented 4 years ago

When debugging e.g. code that waits for VBlank

label: bit $2002 bpl label lda '$xx etc.

It would be very useful to set the cursor to the 'lda ...' line (or the right click context menu for that line) and select 'Run to line' (With a shortcut key of course.)

This should be available for any location, not just the line after the loop as shown above. E.g. you might be deep in the game loop somewhere, and want to get back to the start.

This would set a temporary breakpoint and run. On hitting any break condition (not just that one) the temporary breakpoint is deleted.

I know that the user can set a breakpoint manually, choose run, and delete the breakpoint afterwards. But the 'one hit' scheme as I have outlined would be much easier and quicker to do.

Here's hoping.

SourMesen commented 4 years ago

Thanks for the request. I'm a bit on the fence as to whether it's worth the additional code complexity or not, for now (I'll keep this opened for now, though)

As a tip, just in case you aren't aware of this already, you can set breakpoints by clicking the left-most part of the margin. So this allows you to do: Click (Add breakpoint) -> F5 (Resume) -> Click (Remove breakpoint) fairly easily, without having a specific function for it.

MikeTheAardvark commented 4 years ago

Thanks for the advice.