This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
3 Replies Last post: Jan 23, 2013 5:22 PM by Sergey Simonchik  
Hari Karam Singh Newbie 3 posts since
Jan 23, 2013
Currently Being Moderated

Jan 23, 2013 12:35 AM

Node.js debugger won't execute script

I have a Node.js project which runs fine, but when I go to debug (locally) it runs node with --debug-brk PORT, presumably breaking on the first line.  There is no sign of this in the Editor window. The script doesn't execute, but the debug flow control buttons/commands aren't enabled either.

 

Is this a bug or am I missing something?  I'm running WebStorm 5.0.4 on OSX 10.8.2...

 

Thanks for the help...

Sergey Simonchik Novice 108 posts since
Sep 28, 2011
Currently Being Moderated
Jan 23, 2013 1:58 PM in response to: Hari Karam Singh
Re: Node.js debugger won't execute script

I have a Node.js project which runs fine, but when I go to debug (locally) it runs node with --debug-brk PORT, presumably breaking on the first line.

IDE runs node with --debug-brk because it needs to register breakpoints right after node process is started, but before javascript code is executed.

 

There is no sign of this in the Editor window. The script doesn't execute, but the debug flow control buttons/commands aren't enabled either.

You have to put breakpoints in the editor (like in node_inspector) before debugging.

Sergey Simonchik Novice 108 posts since
Sep 28, 2011
Currently Being Moderated
Jan 23, 2013 5:22 PM in response to: Hari Karam Singh
Re: Node.js debugger won't execute script

Yes, WebStorm 5.0.4 has problems.

http://youtrack.jetbrains.com/issue/WEB-2313

Already fixed in WebStorm 6 EAP.

More Like This

  • Retrieving data ...