Node.js debugging a server using WebStorm (grunt)

I use grunt to start my server using the download function and other tasks. I completed this and this post to complete my tasks. It works, but I cannot debug properly (when I set some breakpoints, they are not)

When I run the script, here is what I got:
enter image description here

As you can see, the debugger appears on the second tab, but does nothing. (even if he says that he is successfully connected).
To debug my application, I have to stop this second tab and start the remote debugger ... Anyway, to fix it?

Additional information: The server starts in another process. If I run it in the same process as grunt, there is no problem.

0
source share
2 answers

As mentioned by Lena, the problem seems to be fixed in WebStorm 8 .

0
source

What Node.js version are you using? In 0.10.x, the child process occupies the same port as the main process, so debugging will not work by default. Associated ticket: https://github.com/joyent/node/issues/5318 . You can check if it works for you using Node.js ersion> = 0.11.4? Also, what kind of Grunt tasks are used?

0
source

All Articles