Open alexandru-vrn opened 1 year ago
Can you try adding this line to your launch.json
? I made a change to MIEngine (the underlying debug engine used by the C/C++ VS Code extenion) a while ago that should let you configure how unexpected breakpoints are handled.
"unknownBreakpointHandling": "stop"
This won't prevent the debugger from stopping entirely (because it sounds like for some reason GDB is still stopping the program), but it should prevent it from appearing as an exception.
I have added the line to launch.json
and the exception is not thrown in the way I described, but this only works once. If I add a new breakpoint then VSCode behaves like before adding the option you mentioned. If I run the program again, the exception is thrown from the first attempt of adding a new breakpoint. I have to restart VSCode and then it behaves as you describe, but only once.
Placing a breakpoint somewhere in the code seems to halt the microcontroller, GDB reporting the following in the debug console tab:
VSCode displays the error like this:
Resuming the program works, and the breakpoint is actually applied and reached by the program execution as expected, regardless of all of the warnings and errors displayed when it is set up.