vscode调试
Opened this issue · 0 comments
303182519 commented
新建launch.json文件
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [{
"type": "node",
"request": "launch",
"name": "Launch via NPM",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"debug"
],
"port": 9229
}]
}
package.json
"scripts": {
"debug": "node --nolazy --inspect-brk=9229 ./node_modules/webpack/bin/webpack.js --config ./build/webpack.test.conf.js"
}
第二种
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "启动程序",
"program": "${workspaceRoot}/node_modules/webpack/bin/webpack.js",
"args": [
"--config=./build/webpack.test.conf.js"
]
}
]
}