ProDBG icon indicating copy to clipboard operation
ProDBG copied to clipboard

Make it easy to set data breakpoints

Open emoon opened this issue 9 years ago • 3 comments

Would be convinient if you could right click on variable in locals/watch and say "add data breakpoint / break when changed"

emoon avatar Nov 20 '14 16:11 emoon

Setting DBPs in Visual Studio is tedious, because you have to add a watch to get the address of the variable you're interested in, then add the breakpoint by copying the address into the "add data breakpoint" dialog. Being able to right-click a variable (either in a watch or in the source view while paused) would help a lot.

The other problem with DBPs in Visual Studio is that the address is only good for one run of the program so you have to re-add the DBP every time. With the above solution, the DBP can remember how the address was arrived at and automatically update the address, if it is rooted on a global. If it was based from local then the debugger doesn't necessarily know.

What I thought to get around this is that when you set a DBP from a local (or drilling down from a local in the equivalent of the Quick Watch popup, if you have that), you get the option to add a conditional breakpoint at the location of the variable. BDPs from previous runs are disabled when the program is restarted, but then the first time that conditional breakpoint is hit on a run, the address of the DBP is re-initialised.

Actually to make this a more general thing, if the debugger is command-based under the GUI, have a command something like "bp init " and then one of the options for a breakpoint other than stopping is to run a command. The option to add the conditional breakpoint at the same time as setting up the DBP would just be a convenience.

rhm avatar Nov 22 '14 18:11 rhm

Sounds like great ideas here. Thanks!

emoon avatar Nov 23 '14 06:11 emoon

Moved to https://prodbg.phoreplay.com/T9

emoon avatar Jan 18 '15 13:01 emoon