search

Home  >  Q&A  >  body text

node.js - nodejs开发,有什么实用的调试技巧,怎么调试nodejs代码?

最近学习nodejs,写了js文件,然后跑到window命令行运行这个js文件。目前会的调试技巧就是,写console.log(要打印的信息),然后去命令行看,所以特地问下nodejs高手:
nodejs开发,有什么实用的调试技巧,怎么调试nodejs代码?

ringa_leeringa_lee2788 days ago684

reply all(4)I'll reply

  • 高洛峰

    高洛峰2017-04-17 13:41:44

    npm install -g node-inspector
    node-debug yourapp.js

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 13:41:44

    Artifact webstrom

    reply
    0
  • 黄舟

    黄舟2017-04-17 13:41:44

    node-inspector is a good thing, relatively lightweight.
    The debug of vscode is also good and can be used together.

    reply
    0
  • 黄舟

    黄舟2017-04-17 13:41:44

    The chrome developer tools can actually be adjusted, but it’s not very convenient

    reply
    0
  • Cancelreply