pcsx2 icon indicating copy to clipboard operation
pcsx2 copied to clipboard

Debugger: Add Reset button

Open allkern opened this issue 11 months ago • 3 comments

Description of Changes

Add a handy 'Reset' button next to the 'Run' button.

Rationale behind Changes

As an emulator developer, resetting while working with the debugger is a pretty common occurrence. Having to reach out to the main window, then clicking on System -> Reset is somewhat cumbersome.

Suggested Testing Steps

Open debugger, click on the 'Reset' button, voila!

Screenshot

image

allkern avatar Dec 13 '24 02:12 allkern

Just as a heads up, I'm currently working on an overhaul of the debugger's UI. If I end up finishing it I'll probably do another pass on how the toolbars work anyway e.g. I could add options to show/hide them and move them around anywhere. I think that would solve the problem nicely, so for now maybe just put the Reset button further away from the Pause button. Don't worry about merge conflicts with said overhaul, they should be easy to fix in this case.

chaoticgd avatar Dec 13 '24 23:12 chaoticgd

image What if something like this is done (But fix the parent QAction and remove the top level reset action)

F0bes avatar Dec 13 '24 23:12 F0bes

PR works as intended, and the code to my untrained eye looks good. However (and I think fobes might agree with me here), I think that it works too well as intended. The button, directly adjacent to the pause button, resets the game immediately on one click. This is, in my opinion, an accident waiting to happen, especially because people using the debugger are the type spend a lot of time trying to meticulously set something up in-game. I think there at least needs to be a prompt confirming to the end user that they want to reset the game. I know this defeats some of the convenience if you're repeatedly reseting the game for some reason, but this is a trade-off for what I imagine is a very small portion of users compared to the much higher likelihood that a user generally doesn't want to reset the game from within the debugger.

I agree, I definitely wouldn't mind moving the reset button elsewhere as long as it's there, maybe to the right of 'Step Out'? F0bes suggestion also looks nice. I don't really know Qt that much so I wouldn't know how to pull it off, but you're welcome to change the code however you like

allkern avatar Dec 15 '24 14:12 allkern

Reset button was added in https://github.com/PCSX2/pcsx2/pull/12241

lightningterror avatar Apr 26 '25 08:04 lightningterror