这是我的VS Code launch.json
文件:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:4321",
"port": 9222,
"webRoot": "${workspaceFolder}"
}
]
}
我想要的是在调试开始之前运行npm start
命令,即运行开发服务器,然后启动Chrome实例并导航到提供的URL。
因此,我将以下代码片段添加到配置文件中并运行了调试:
"cwd": "${workspaceRoot}",
"runtimeExecutable": "npm",
"runtimeArgs": [
"start"
]
但是我遇到了这个错误:
Attribute runtimeExecutable does not exist ('npm')
有需要帮忙的吗?