如何用vscode调试nodejs express框架的项目?

ゝ一世哀愁。 2023-06-18 06:57 194阅读 0赞

点击Add Configuration,添加nodeJs的launch.json
在这里插入图片描述
编辑launch.json,设置launch.json如下即可:

  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "type": "node",
  6. "request": "launch",
  7. "name": "Launch Program",
  8. "program": "${workspaceFolder}/bin/www",
  9. "skipFiles": [
  10. "<node_internals>/**"
  11. ]
  12. },
  13. {
  14. "type": "node",
  15. "request": "attach",
  16. "name": "Attach",
  17. "port": 5858
  18. }
  19. ]
  20. }

运行:
在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,194人围观)

还没有评论,来说两句吧...

相关阅读