如何防止进入node_modules [英] How to prevent to step into node_modules
本文介绍了如何防止进入node_modules的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在vs代码编辑器中调试打字稿项目文件时,如何防止进入node_modules/*.js文件.当我在我的typecipt文件上使用berakpoint启动调试过程时,我想跳过js 文件自动位于node_modules目录下.
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.
//我的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"]
} ]
}
推荐答案
将以下内容添加到launch.json ...
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"
]
然后,这还将排除节点内部文件(net.js,事件. js等).
Which then also excludes node internal files (net.js, events.js, etc) if you wish.
通过文档此处
这篇关于如何防止进入node_modules的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文