-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Description
Chrome devtools calls this "Blackboxed scripts" and VS/F12 use "Library code" and "Just my code".
This feature has been requested several times - examples,
- Make debugger respect "files.exclude" or introduce a hiding mechanic #3215
- Support debugging "Just my code" vscode-chrome-debug-core#7
- blackbox/ignore modules for debugging in node vscode-node-debug#16.
It could be implemented entirely in the debug adapter, with a new option in the launch config, and I hope to do that to try it out. But when I've used it, I've found it most useful when I can mark a script as "library code" on the fly. For this, we would need a context menu option on the callstack which can mark/unmark a particular script as library code, debug protocol support, and a toggle button to globally enable/disable the feature. (For the last item, we could use the 'exceptionBreakpointFilters' - is there anything wrong with reusing that for something besides exception breakpoints?) We also need to persist these.
This is implemented by the chrome debugging protocol. For reference it looks like this - https://chromedevtools.github.io/debugger-protocol-viewer/v8/Debugger/#method-setBlackboxPatterns - but we really just need a message that includes a DebugProtocol.Source and the library code state. I think this is of general interest since VS implements it for Javascript, C++, C# and other languages.
Thoughts/comments?