[英]How to continue debug VSCode extension when extension open new windows?
I press F5
to debug a VSCode extension and VSCode will open a new window that will contain the extension.我按
F5
调试 VSCode 扩展,VSCode 将打开一个包含扩展的新 window。 The extension will open a new VSCode window to open a specific project.该扩展将打开一个新的 VSCode window 来打开一个特定的项目。 But this new VSCode window didn't contain the extension and I can't debug it anymore.
但是这个新的 VSCode window 不包含扩展,我不能再调试它了。 What can I do?
我能做些什么?
Not sure if you are looking for a specific extension.不确定您是否正在寻找特定的扩展名。 If you have already installed the debugger extension, Try to uninstall/reinstall.
如果您已经安装了调试器扩展,请尝试卸载/重新安装。
Your automatically generated extension launch configuration should look like this:您自动生成的扩展启动配置应如下所示:
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceFolder}/../OneDrive/Test Bed", // add the path here
"--extensionDevelopmentPath=${workspaceFolder}"
]
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/test/suite/index"
]
}
]
}
You see in the Run Extension
configuration that I added a path from the extension's ${workspaceFolder}
up one level and then into my OneDrive folder to another folder named Test Bed
.您在
Run Extension
配置中看到,我从扩展的${workspaceFolder}
向上添加了一个路径,然后添加到我的 OneDrive 文件夹到另一个名为Test Bed
的文件夹。 That Test Bed
folder will be opened in the first ExtensionHost
window that is opened when you F5
and you can debug the extension using that folder immediately.该
Test Bed
文件夹将在您按F5
时打开的第一个ExtensionHost
window 中打开,您可以立即使用该文件夹调试扩展。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.