Open stellarpower opened 3 years ago
Disable/Enable Feature is similar to https://github.com/microsoft/vscode-cpptools/issues/514 DataBreakpoints are at https://github.com/microsoft/vscode-cpptools/issues/1410 Exception Handling is at https://github.com/microsoft/vscode-cpptools/issues/1800
For the core request of Disable/Enable source files to skip over, you can use setupCommands
in your launch.json
.
e.g.
"setupCommands": [
{
"description": "Skip over stdlib/*.c",
"text": "-exec skip -gfi stdlib/*.c",
"ignoreFailures": true
}
]
Thanks for the workaround - shall I close in favour of those other issues?
Add Support for Enabling/Disabling Steeping into System Libraries
Type: Feature Request
(I would've thought this would have been an existing issue, or solved, but I haven't found anything after ~20 minutes.)
Background
Sometimes we explicitly want to step into, and set breakpoints in, either the standard library, or other installed system libraries. And at other times, this can be a nuisance that makes "step into" inconvenient to use, for example, because it steps into copy constructors, move assignment operators, whatever it may be, that are performed before the call to our own function. When undesired, the latter can disrupt our flow and be a distraction. Whilst when working on code installedin a systrem location, stepping into the former is an essential requirement.
Rough Proposed Solution
Provide a setting, preferably in launch.json, (so that it can be enabled on a project-by-project, or configuration-by-configuration basis), to enable or disable stepping into system libraries by default.
When stepping into system libraries is enabled:
Stepping into code will step into any standard library, or other system library, files/stackframes
(Unhandled) exceptions thrown from system library code will cause the debugger to break at the thrown location in the library code
Data breakpoints break on the nearest instruction that produces the change; be this library or user code.
When disabled:
Stepping into code will ignore any system library code - except if an explicit breakpoint has been set
(Unhandled) exceptions thrown in library code will cause the debugger to break at the first stackframe that is in user code
Data breakpoints will ignore the location inside system libraries where the value was modified, and instead break in the first user code stackframe where the call producing the change occurred. This may be more subtle and harder to implement in an intuitive way that isn't misleading.
I'm not sure if data breakpoints currently work in C++ in VS Code - at least, I do not see any way to enable it on my setup, but, even if absent, I expect it wil be added in due course.
Implementation Details