How to prevent to step into node_modules/*.js files when debugging the typescript project files in vs code editor. When I start a debug process with a berakpoint on my typescipt file, I want to step over js files under node_modules directory automatically.
// my launch.json
{
"version": "0.2.0",
"configurations": [ {
"name": "LaunchChrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:4200",
"sourceMaps": true,
"trace": true,
"webRoot": "${workspaceRoot}",
"userDataDir": "${workspaceRoot}/.vscode/chrome",
"runtimeArgs": [ "--disable-web-security"]
} ]
}
Add the following to your launch.json...
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js"
]
From the sound of your question, you may also want to exclude the following...
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
]
Which then also excludes node internal files (net.js, events.js, etc) if you wish.
Via documentation here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With