microsoft / MIEngine

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb and lldb.
MIT License
818 stars 218 forks source link

Add configuration for handling of unknown breakpoints #1351

Closed benmcmorran closed 2 years ago

benmcmorran commented 2 years ago

Today, breakpoints set outside of a DAP or AD7 command are treated as application exceptions. This can be unexpected, particularly in cases where the breakpoint was also set in the launch configuration. For example, postRemoteConnectCommands might include tbreak main. This PR adds a new unknownBreakpointHandling configuration option to for these unknown breakpoints.

gregg-miskelly commented 2 years ago

@benmcmorran was there a scenario you had in mind when ignore would be useful? Feels kind of dangerous to me -- if we are getting a bunch of stopping events it is going to make execution super slow, and also break stepping if you are stepping over a function triggering these. Though maybe it is okay to be complete.

benmcmorran commented 2 years ago

@gregg-miskelly I don't have a specific use-case for ignore. It was just easy to add for completeness and I was already editing that part of the codebase. Given that it sounds like it could be a dangerous option, I'm happy to remove it, although I'd like to keep the configuration option as an enum to allow for additional handling options in the future.

gregg-miskelly commented 2 years ago

Makes sense. I am fine with either leaving it in, but adding a disclaimer, or taking it out.