Search code examples
visual-studio-codevisual-studio-debugging

How to properly handle breakpoints in multiroot workspaces?


In multiroot workspaces, e.g. a c++ project together with a matlab project, if the user tries to run a debug session for the matlab project, vscode sends all set breakpoints including those set in the c++ project to the debugger extension being launched.

What is the proper way to handle this? Seems like simply ignoring the non-matlab files or even sending back a breakpoint with unverified or verified flag still leaves vscode waiting for something, and configurationDoneRequest never gets called.

Manually removing all breakpoints from the c++ project seems to work though.

Any documentation on this matter? Thanks!


Solution

  • You must send a response, and the correct thing to do is to call the breakpoints unverified, that's exactly what they are.