在VS Code中调试时如何跳过外部代码 [英] How do I skip external code when debugging in VS Code

查看:651
本文介绍了在VS Code中调试时如何跳过外部代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

vscode 中调试时,我想做一些黑匣子操作,不要输入我未编写的代码。我该怎么做?

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?

推荐答案

在启动或附加调试任务中,您可以输入a

In your launch or attach debug task you can enter a


skipfiles

"skipfiles"

选项


在调试时跳过的文件或文件夹名称或路径全局数组。

"An array of file or folder names, or path globs, to skip when 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"
]

这篇关于在VS Code中调试时如何跳过外部代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆