How do I debug Node.js applications?

后端 未结 30 2507
暗喜
暗喜 2020-11-22 05:56

How do I debug a Node.js server application?

Right now I\'m mostly using alert debugging with print statements like this:

sys.puts(sys.inspe         


        
30条回答
  •  一个人的身影
    2020-11-22 06:33

    I personally use JetBrains WebStorm as it's the only JavaScript IDE that I've found which is great for both frontend and backend JavaScript.

    It works on multiple OS's and has Node.js debugging built-in (as well as a ton of other stuff](http://www.jetbrains.com/webstorm/features/index.html).

    My only 'issues'/wishlist items are were:

    1. It seems to be more resource hungry on Mac than Windows It no longer seems an issue in version 6.
    2. It would be nice if it had Snippet support (like those of Sublime Text 2 - i.e. type 'fun' and tap 'tab' to put in a function. See @WickyNilliams comment below - With Live Templates you also have snippet support.

提交回复
热议问题