I have a NodeJS script that is designed for executing on the command line, ala a shell script.
I want to debug my script in phpStorm 7 however the debugger just sits there and doesn't debug my script.
Script:
#!/usr/bin/env node
var fs = require("fs");
....
phpStorm debug console output:
/opt/local/bin/node --debug-brk=51096 main.js
debugger listening on port 51096
Reading http://www.jetbrains.com/phpstorm/webhelp/running-and-debugging-node-js.html it appears as if the NodeJS plugin is biased towards web applications since most of the instructions contain a line like
copy the URL address at which the application is running.
Which doesn't make sense in this context.
I can run the script via the NodeJS Run Configuration, but I can't debug.
Is there something I'm doing wrong, or is this a fault of the plugin?
UPDATE:
To answer lena's questions:
- OS is OSX Snow Leopard
- Java version is 1.6.0_51
- NodeJS version is v0.10.19
- IDE build is phpStorm 7 build 131.374
- NodeJS plugin version 131.488
I had a look at the link lena mentioned and I do have a similar issue, in that the debugger is started but not the app (see console log output above). The issue was fixed for that user in WebStorm 7.0.1 Perhaps this issue will be fixed in a point release of phpStorm if the fixes are merged into the codebase.
Finally, I'm aware that the mention of the browser in the phpStorm web help is a red herring, perhaps the documentation should be updated to accommodate the running/debugging of NodeJS scripts that don't have a web component.