[GH-ISSUE #4158] Discussing Breakpoint improvements #1688

Closed
opened 2026-03-18 02:36:25 +03:00 by kerem · 2 comments
Owner

Originally created by @mchubby on GitHub (Oct 13, 2013).
Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/4158

PPSSPP has made huge leaps recently in the debugging department thanks to great contributions by @Kingcom and @unknownbrackets (#2584, #3366).

I'm opening this meta-issue to discuss what improvements could be made to make it even awesomer.

  • What is your use case of bps, mem bps, ge bps?
  • What feels the most usable, or conversely needs rework?

Feel free to input your opinion below.

Here is the current state of the Breakpoint Window:

Breakpoint Dialog
#1 - Improvements to breakpoints (logging, etc.)

Log breakpoints are not a specific type of breakpoint, rather it is a breakpoint which triggers an action, which is logging an expression.
They offer the choice to not enter debug mode when hit.

Let's review what options are offered in other debuggers:

  • OllyDbg 1.x:
    OllyDbg offers to execute diverse actions depending on whether a condition is fulfilled, etc. It can also cast the logged expression to a struct/string/etc. pointer for proper display.

Log bp in OllyDbg 1

  • OllyDbg 2.x:
    OllyDbg goes a bit further, removes support for plugin (temp?) and is able to log several expressions

Log bp in OllyDbg 2 ss1
Log bp in OllyDbg 2 ss2

  • Visual Studio:
    VS has more basic logging, but being a source-based debugger, can support symbols as well.

Log bp in VS2010 ss1
Log bp in VS2010 ss2

Actions

  • Add a textedit for an expression. When bp is hit & conditions are met (in pseudo-language)

if bp.expr.valid(): log(expr.eval(currMIPS))

  • Add a checkbox to continue execution
  • Take screenshot on bp?
    #2 - Enhancements to memory view
  • Have the memory view set viewport at a particular expression (e.g. a1+4) when bp is hit
  • Keep navigation stack so you can return to a previous location instead of typing it again.
  • Right-click on location => in contextual menu, offer option to set or modify a memory bp / dump with this location as base address / highlight (change background color)
  • location under cursor to be interpreted with base conversion (8-bit, 16-bit, 32-bit). Detect if it is an address pointing to a code / variable section
  • select range (mouse selection or R-click, select x bytes from here) and ability to copy / dump selection, may be useful for tile extractors? Offer inline string decoding options (e.g. display converted SJIS)
  • Enable more interactions with the symbols list?

Actions

  • Add a textedit for an expression. When bp is hit & conditions are met, update memory view

Mockup

mockup

Other improvements

  • Auto-load (auto-save?) Map symbols
  • Remember bps when emulator is restarted
  • Label breakpoints / comment field?
  • how to handle memory bps when a system library writes into a buffer? (no break currently)

Sorry if it looks like a wishlist of mine... Also, I do not use the Ge debugger so can't comment on it.

Originally created by @mchubby on GitHub (Oct 13, 2013). Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/4158 PPSSPP has made huge leaps recently in the debugging department thanks to great contributions by @Kingcom and @unknownbrackets (#2584, #3366). I'm opening this meta-issue to discuss what improvements could be made to make it even _awesomer_. - What is your use case of bps, mem bps, ge bps? - What feels the most usable, or conversely needs rework? Feel free to input your opinion below. Here is the current state of the Breakpoint Window: > ![Breakpoint Dialog](http://i.imgur.com/XEqRnIO.png) #1 - Improvements to breakpoints (logging, etc.) Log breakpoints are not a specific type of breakpoint, rather it is a breakpoint which **triggers an action**, which is logging an expression. They offer the choice to **not enter debug mode** when hit. Let's review what options are offered in other debuggers: - OllyDbg 1.x: OllyDbg offers to execute diverse actions depending on whether a condition is fulfilled, etc. It can also cast the logged expression to a struct/string/etc. pointer for proper display. ![Log bp in OllyDbg 1](http://i.imgur.com/yNcHGDO.png) - OllyDbg 2.x: OllyDbg goes a bit further, removes support for plugin (temp?) and is able to log several expressions ![Log bp in OllyDbg 2 ss1](http://i.imgur.com/C4GiUdl.png) ![Log bp in OllyDbg 2 ss2](http://i.imgur.com/gAAmoaf.png) - Visual Studio: VS has more basic logging, but being a source-based debugger, can support symbols as well. ![Log bp in VS2010 ss1](http://i.imgur.com/jhYePuB.png) ![Log bp in VS2010 ss2](http://i.imgur.com/WdZoTRl.png) ### Actions - Add a textedit for an expression. When bp is hit & conditions are met (in pseudo-language) `if bp.expr.valid(): log(expr.eval(currMIPS))` - Add a checkbox to continue execution - Take screenshot on bp? #2 - Enhancements to memory view - Have the memory view set viewport at a particular expression (e.g. a1+4) when bp is hit - Keep navigation stack so you can return to a previous location instead of typing it again. - Right-click on location => in contextual menu, offer option to **set or modify a memory bp** / dump with this location as base address / **highlight** (change background color) - location under cursor to be interpreted with **base conversion** (8-bit, 16-bit, 32-bit). Detect if it is an address pointing to a code / variable section - select range (mouse selection or R-click, select x bytes from here) and ability to **copy / dump selection**, may be useful for tile extractors? Offer **inline string decoding** options (e.g. display converted SJIS) - Enable more interactions with the symbols list? ### Actions - Add a textedit for an expression. When bp is hit & conditions are met, update memory view # Mockup ![mockup](http://i.imgur.com/VJBi6ga.png) # Other improvements - Auto-load (auto-save?) Map symbols - Remember bps when emulator is restarted - Label breakpoints / comment field? - how to handle memory bps when a system library writes into a buffer? (no break currently) Sorry if it looks like a wishlist of mine... Also, I do not use the Ge debugger so can't comment on it.
kerem 2026-03-18 02:36:25 +03:00
Author
Owner

@unknownbrackets commented on GitHub (Oct 20, 2013):

Logging doesn't seem crazy, but I don't really see myself using it much. I could definitely be wrong.

Definitely one could do a lot more with the memory view.

Well, iirc, "on change" doesn't work. It could work by, every time it breaks, checking the value and setting the old historic value if it changed or something.

Symbols - there's a config setting for that, AutoSaveSymbolMap. Set it in ppsspp.ini.

I actually like it "forgetting" breakpoints on restart, which is what Visual Studio does I thought. I wouldn't mind if it remembered them and just had them disabled by default, though. They're almost "bookmarks" (which is a feature of Visual Studio I use quite a bit.) Labels probably make sense if we keep them.

Memory breakpoints when HLE writes is a pain. The biggest problem is that it will cause a performance impact (even when there are no breakpoints) if done the most obvious way. But we'll want to do it eventually.

-[Unknown]

<!-- gh-comment-id:26665719 --> @unknownbrackets commented on GitHub (Oct 20, 2013): Logging doesn't seem crazy, but I don't really see myself using it much. I could definitely be wrong. Definitely one could do a lot more with the memory view. Well, iirc, "on change" doesn't work. It could work by, every time it breaks, checking the value and setting the old historic value if it changed or something. Symbols - there's a config setting for that, AutoSaveSymbolMap. Set it in ppsspp.ini. I actually like it "forgetting" breakpoints on restart, which is what Visual Studio does I thought. I wouldn't mind if it remembered them and just had them disabled by default, though. They're almost "bookmarks" (which is a feature of Visual Studio I use quite a bit.) Labels probably make sense if we keep them. Memory breakpoints when HLE writes is a pain. The biggest problem is that it will cause a performance impact (even when there are no breakpoints) if done the most obvious way. But we'll want to do it eventually. -[Unknown]
Author
Owner

@unknownbrackets commented on GitHub (Jun 9, 2018):

Log messages now exist - and now that we have a debugger API (#10909), a lot of these features could be automated via API client for specific use cases - which I think is more powerful.

We also do now have a navigation stack (so does the web debugger UI already.)

I'm going to close this - we can open specific issues for specific improvements.

-[Unknown]

<!-- gh-comment-id:395995296 --> @unknownbrackets commented on GitHub (Jun 9, 2018): Log messages now exist - and now that we have a debugger API (#10909), a lot of these features could be automated via API client for specific use cases - which I think is more powerful. We also do now have a navigation stack (so does the web debugger UI already.) I'm going to close this - we can open specific issues for specific improvements. -[Unknown]
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ppsspp#1688
No description provided.