安装node-inspector模块

  $ npm install -g node-inspector

调试

  1. debug模式启动应用:

    $ node --debug yourApp.js

    或者,debug模式启动应用并且停在第一行:

    $ node --debug-brk yourApp.js
  2. 启动inspector
    $ node-inspector
    
  3. 在chrome地址栏中输入:
    http://127.0.0.1:8080/debug?port=5858

  4. 选择js文件,开始你的Debug之旅:

用Chrome调试NodeJS

 

相关文章:

  • 2021-11-30
  • 2021-08-23
  • 2021-12-17
猜你喜欢
  • 2021-04-12
  • 2022-12-23
  • 2021-11-05
  • 2021-11-30
  • 2021-11-30
  • 2021-11-30
相关资源
相似解决方案