VSCode扩展调试问题:找不到任务“ npm”

时间:2020-04-20 16:40:18

标签: visual-studio-code vscode-extensions vscode-debugger

我正在尝试启动VSCode扩展,但是我无法调试它。当我按F5时,弹出窗口显示“找不到任务'npm'”,这是我的launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "extensionHost",
            "request": "launch",
            "name": "Launch Extension",
            "runtimeExecutable": "${execPath}",
            "args": [
                "--extensionDevelopmentPath=${workspaceFolder}"
            ],
            "outFiles": [
                "${workspaceFolder}/out/**/*.js"
            ],
            "preLaunchTask": "npm"
        }
    ]
}

还有我的task.json:

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "npm",
            "script": "install",
            "path": "togglecomments/",
            "problemMatcher": [],
            "label": "npm: install - togglecomments",
            "detail": "install dependencies from package"
        }
    ]
}

我在Windows 10上,安装了npm(版本6.13.4)和Node(版本12.16.1)。我怎么了?

0 个答案:

没有答案