Breakpoint sequences...
Something that I find myself wanting in a debugger from time to time are breakpoints that only fire if the code has been entered via a specific route. You know the problem, you’ve tracked a particular issue down to one specific call sequence that occurs at a specific point in the code. The line you want to break on in this instance is also hit a lot via other routes that you don’t care about. I find myself setting a breakpoint higher in the call stack that I’m interested in and then when I hit that I switch to the place I’m really interested in and enable the breakpoint there… It would be nice to be able to say “this breakpoint is only active if this breakpoint (which you don’t actually stop on) is hit. It would be relatively easy to implement in the debugger; you’d always set the physical breakpoint but you would only pass it on to the user if the logical state was set, most of the time the logical state would be set except for these ‘chained’ breakpoints where BP2 would only be ’logically set’ if BP1 (which is always logically unset as it’s just a way of marking the code) has been hit. I guess it would mean tracking breakpoint state per thread…
Anyway, back to my tests…