A simple Node.js/io.js debugger for daily use.
Debug panels will show up as shown in the image below.
The '>' symbol in the gutter marks the current line of execution.
Execute the toggle-breakpoint (F9) command to set a breakpoint. The breakpoint will be displayed in the gutter using a red marker.
Execute start-resume (F5) again to resume debugging or use the step-next (F10), step-in (F11) or step-out (shift-F11) commands.
You may access the commands using CMD/Ctrl+p or by using the shortcut key specified within the brackets.
'node-debugger:start-resume' (F5)'node-debugger:debug-active-file' (ctrl-F5)'node-debugger:stop' (shift-F5)'node-debugger:toggle-breakpoint' (F9)'node-debugger:step-next' (F10)'node-debugger:step-in' (F11)'node-debugger:step-out' (shift-F11)'node-debugger:attach'
The following attributes can be set to control the node-debugger.
An example of a configuration is given below.
"node-debugger":nodePath: "C:/program/nodejs/node.exe"nodeArgs: "--use-strict --use_inlining"appArgs: "--arg1=10 --arg2"debugHost: "192.168.0.20"debugPort: 5860env: "key1=value1;key2=value2;key3=value3"scriptMain: "c:/myproject/main.js"
When executing the start-resume command the node-debugger will try to figure out which file that is the main file of the current atom project. This is the strategy being used:
Start your node application in debug mode using
>node --debug=5858 a.js
>node --debug-brk=5858 a.js
Make sure that your node-debugger settings for debugHost and debugPort are matching what you are using. In the case above debugPort should be 5858.
Execute command node-debugger: attach either from the menu or using the command panel.
Check in the node-debugger package settings that the node path is set correctly.
Please click here to provide me more suggestions to improve this debugger, thanks :D
CoffeeScript supportError Handling
io.js. The process doesn't stop when your process finished.
So it will have no response from debugger server and will not keep going debugging.
When you face that issue, just use the
x button to stop the process by yourself.
Issue report is here: https://github.com/nodejs/io.js/issues/1788
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.