Starting my Node.js server in debug mode has become very slow, to the point of being almost unusable.
Currently my Node.js server process takes about 11 seconds to start in debug. That is a big improvement in relationship with some of the earlier builds of version 6 which could take up to 20 seconds. But it compares badly with a second when I startit from the command line or simply hit "run" from WebStorm. The same project opened with WebStorm 5 only takes 4 seconds to start in debug. In all this cases, it is always the same project with the same code.
The startup sequence is quite straightforward: I load express (with some routes), connect to mongodb and redis and wait for connections. Nothing fancy.
I have increased my vm options to make sure that it is not memory starved, but I haven't seen any improvements. Any ideas?
Could attach test project? See http://youtrack.jetbrains.com/issue/WEB-6581
I have the same problem, in WebStorm 5 the debugger would take maybe 30 seconds for my project to startup and be ready to debug for node.js, in WebStorm 6 I haven't timed it, but it's long enough to go take a nap, go to the bathroom, get a coffee and it's finally started.
I'll have to go back to WebStorm 5 until this is resolved,
One possible cause of this is the JetBrains Chrome Extension,
I didn't have it installed before I upgraded to WebStorm 6, now, even after I've gone back to using WebStorm 5, my debugging is very slow, I've even uninstalled the Chrome Extension and I have the same problem.
More information: My co-worker is using WebStorm 6, same project and his
debugging is fine (just as it was in WebStorm 5), he thought he used to have the Chrome Extension installed, but when we looked, he doesn't have it installed anymore.
I can't seem to figure this out, I've switched back to version 6 and I'm still having the problem.
How long does it take for debug mode from the command line (without WebStorm) to start for you?
For example, in your project directory, try
node debug app.js
When I run node debug app.js it works great, maybe takes 10 seconds to start showing the log messages I expect and it breaks on the first line of app.js.
If I run the command that webstorm says it's running:
node --debug-brk=54854 app.js
It hangs forever just like in webstorm.
thanks for your help,
if I start on the command line with: node --debug-brk=56986 server.js
and then open my browser to:
then the debugger process wakes up or stops hanging and I see my console messages.
Perhaps there is something similar going on when I debug through webstorm where it is waiting for the connection from the chrome extension?
Another Interesting thing to Note:
When I debug a simple node file through WebStorm (a mocha test debugging harness) instead of the main app.js which uses express/connect, etc... It starts up and runs through, but it doesn't break on my breakpoints that I set at all!
This is on Mac OS X, I've tried different versions of node as well, 0.6.19 and 0.8.20, same issue.
I was able to get the breakpoints working in my small (mocha test) configuration. I think the key was by upgrading the nodejs plugin within webstorm.
After that was working, I noticed that in my larger project (with express, etc...) if I startup with the option of "break on all exceptions" I see it breaks immediately. I tried this because I noticed this bug:
mentions that breaking on all exceptions shows breakpoints.
As I step through after "Breaking on all exceptions" it hits the fs.js file under frames in the debugger tab (as shown in the screenshot) and the path shows it hitting this exception for just about every node_module.
This could explain why it's taking forever to startup the debugging if it's hitting exceptions for whatever reason in every one of my node modules.
Hope this helps get the the bottom of the issue. I'd rather not have to rebuild my whole machine to get the debugging working correctly again in WebStorm.
We are investigating this problem. About JB IDE support extension — we use it only for browser debug, extension is not needed for Node JS.
Any updates on this issue?
My coworker had tested his debugger again and notified me that it was broken (super slow) for him as well. I suspect it may be caused or made worse by some recent node_module put into our repository, I tried removing some of the more recently added modules though and it didn't help, so it's still a mystery to me.
I hope it was fixed in WebStorm 6.0.2 (coming soon)/IntelliJ IDEA 12.1.
This will really make a HUGE difference in my day to day work. I have to restart the server a many, many times each day (since I tend to make a lot of bugs that I have to debug).