[英]Is it possible to “blackbox” or skip other extensions when debugging vscode extensions?
I have an issue where my development environment has a few large extensions in it, and debugging my own extension using the "All exceptions" and/or "Promise rejects" breakpoints will hit on them quite frequently. 我的问题是我的开发环境中包含一些大扩展,而使用“所有异常”和/或“承诺拒绝”断点调试我自己的扩展会经常遇到这些问题。
I am aware of the skipFiles
option in the launch configuration, and that you can use a custom "Data" folder when launching code
with the --user-data-dir
option, but neither of these solutions seem to work for me. 我知道启动配置中的skipFiles
选项,并且使用--user-data-dir
选项启动code
时可以使用自定义的“ Data”文件夹,但是这些解决方案似乎都不适合我。 I can't figure out how to find generically define the extensions folder with skipFiles
, and --user-data-dir
doesn't seem to work as I'd expected and doesn't seem to be for my purpose. 我无法弄清楚如何使用skipFiles
来通用地定义扩展文件夹,并且--user-data-dir
似乎不符合我的预期,也不是出于我的目的。
To put it plainly, my ideal situation would be to use the debug shortcut F5
and for a completely sterile version of vscode to launch with only my extension loaded and settings which aren't inherited from my development environment. 简而言之,我的理想情况是使用调试快捷键F5
并启动完全无菌版本的vscode,仅加载我的扩展名和未从我的开发环境继承的设置。
In the following image of a breakpoint being hit , you can see that the first party extension "git" in the path "/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/src/git.ts" is still being tracked. 在遇到断点的下图中 ,您可以看到路径“ / Applications / Visual Studio Code.app/Contents/Resources/app/extensions/git/src/git.ts”中的第一方扩展“ git”仍在跟踪中。 The command line switch --disable-extensions
does not exclude this either. 命令行开关--disable-extensions
也不排除这一点。
You can disable all other extensions when debugging your own extension via the --disable-extensions
flag. 通过--disable-extensions
标志调试您自己的扩展时,可以禁用所有其他扩展。 Just pass it via the args
attribute in your launch.json
: 只需通过launch.json
的args
属性将其launch.json
:
"args": [
"--disable-extensions"
]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.