Unable to open Extension Development Host for TypeScript project

筅森魡賤 提交于 2021-02-09 04:19:09

问题


I am trying to go through the first vs code extension tutorial, but I am unable to open the extension development host. Hitting F5 does nothing, and clicking on the start button in the debug sidebar doesn't seem to do anything either.

I have generated my project using yo code and picked the TypeScript option.

I have experimented with picking the JavaScript option and that seems to work fine.

launch.json looks like:

// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Extension",
            "type": "extensionHost",
            "request": "launch",
            "runtimeExecutable": "${execPath}",
            "args": [
                "--extensionDevelopmentPath=${workspaceFolder}"
            ],
            "outFiles": [
                "${workspaceFolder}/out/**/*.js"
            ],
            "preLaunchTask": "npm: watch"
        },
        {
            "name": "Extension Tests",
            "type": "extensionHost",
            "request": "launch",
            "runtimeExecutable": "${execPath}",
            "args": [
                "--extensionDevelopmentPath=${workspaceFolder}",
                "--extensionTestsPath=${workspaceFolder}/out/test"
            ],
            "outFiles": [
                "${workspaceFolder}/out/test/**/*.js"
            ],
            "preLaunchTask": "npm: watch"
        }
    ]
}

来源:https://stackoverflow.com/questions/50638931/unable-to-open-extension-development-host-for-typescript-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!