Debug with console
Debug with Eclipse
First, install eclipse add-on - Google Chrome Developer Tools
repository: Google Chrome Developer Tools - http://chromedevtools.googlecode.com/svn/update/dev/
1. Open command prompt, enter debug commands:
node --debug[=port] NodeApp.js
2. In Eclipse, click Debug Configuration, create V8 vm with port 5858. Click Debug
3. In Eclipse, go to debug perspective. Under Project Explore, select the VM you will run on. Open The file associate with the debugging file. Make break point on the line with util.debug() .remember! When you put break point on lines other than util.debug(), The program will not pause!!!!
Reference:
https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger