Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I skip external code when debugging in VS Code

When debugging in vscode I'd like to make some "blackboxing" and do not enter into code I didn't write. How can I do this?

like image 453
Pavel L Avatar asked Nov 29 '17 15:11

Pavel L


People also ask

How do I skip the code while debugging in Visual Studio?

You can also click on the line you want to skip to and hit Ctrl+F10 (Run to Cursor).

What is launch json in VS Code?

A launch. json file is used to configure the debugger in Visual Studio Code. Visual Studio Code generates a launch. json (under a . vscode folder in your project) with almost all of the required information.


2 Answers

In your launch or attach debug task you can enter a

"skipfiles"

option which is

"An array of file or folder names, or path globs, to skip when debugging."

For example, from skipping node internals during debugging

"skipFiles": [   "${workspaceFolder}/node_modules/**/*.js",   "${workspaceFolder}/yourLibToSkip/**/*.js" ] 

Also, there is a "magic reference" to the built-in core node modules you can use:

"skipFiles": [   "<node_internals>/**/*.js" ] 
like image 151
Mark Avatar answered Sep 18 '22 12:09

Mark


Only this worked for me.

"debug.javascript.terminalOptions": {     "skipFiles": [         "<node_internals>/**"     ] } 
like image 32
Julian Avatar answered Sep 19 '22 12:09

Julian