Aniruddha Das
Aniruddha Das

Reputation: 21698

Best way to debug Node.js application in IntelliJ or WebStorm

I see a lot of posts how to debug posts and talks on how debug node application and they mostly points to vs code and other command line tools.

As a fan of IntelliJ and WebStorm IDE, is anything I am missing which can save my day while debugging my Node.js application?

Upvotes: 7

Views: 13850

Answers (2)

Sean Ray
Sean Ray

Reputation: 1067

Jetbrains has a write up of how to debug Node.js applications that is a good starting point:

https://www.jetbrains.com/help/idea/running-and-debugging-node-js.html

The biggest issue that I've run into is that none of the provided solutions automatically restart your application when changes are made. I've worked around this by using their remote debug functionality and attaching to a server running with nodemon. However, I still have to manually restart the remote debug job in IntelliJ as it does not automatically reconnect when the remote debug server restarts.

There is an open YouTrack request to add this functionality, but Jetbrain's recommendation is to instead use their Live Edit functionality.

Live Edit is bundled by default with Webstorm, but has to be installed on IntelliJ Ultimate. I have not tried using Live Edit with a Node.js application, but their documentation says that it should work.

Upvotes: 3

lena
lena

Reputation: 93868

Please see https://blog.jetbrains.com/webstorm/2014/05/guide-to-node-js-development-with-webstorm/ - this post is not new, but still relevant

Upvotes: 5

Related Questions