如何用vscode调试nodejs express框架的项目?
点击Add Configuration,添加nodeJs的launch.json
编辑launch.json
,设置launch.json如下即可:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/bin/www",
"skipFiles": [
"<node_internals>/**"
]
},
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 5858
}
]
}
运行:
还没有评论,来说两句吧...