1、创建启动文件
2、添加配置 ,然后把原来的删掉
launch.js
{
// 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": "Launch via NPM",
"request": "launch",
"runtimeArgs": [
"run-script",
"debug"
],
"runtimeExecutable": "npm",// 通过npm 执行上面脚本:run-script 、 debug
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node"
}
]
}
3、给要调试的代码打断点
4、然后就可以运行调试啦