Debugging server side with node.js Debugging server side with node.js express express

Debugging server side with node.js


You can still do console.log(). It'll print to the screen where you run the server. However, it's not as good as walking through the code with debugger which you can set breakpoints and do lots of other things debuggers can do. I've used both webstorm's debugger and node-inspector.

You might want to look into node-inspector. The debugger is like Chrome's Dev-Tool, which you might be familiar with. The link below provides everything from installation to tutorials.

https://github.com/node-inspector/node-inspector


Node comes with a REPL (Read-Eval-Print-Loop). It works a bit like the console of chrome but requires a bit of configuration and set up of it's scope.

Here is an example: http://derickbailey.com/2014/07/02/build-your-own-app-specific-repl-for-your-nodejs-app/


if you do console.log to variables and objects you can see it on you command prompt from where you are running your server