From Chrome DevTools you can debug your Node.js application by adding breakpoints, controlling the step-by-step execution, and explore variables and call stack
Node Inspect
Instead of adding console.log you can add Logpoints as if they were breakpoints and they will be logged during debugging.
Node Inspect
From DevTools you can also profile the memory of your application to learn more about allocation, and hunt down memory leaks.
Some tips
Start to debug on a running process with:
kill -USR1 <pid>
Add a breakpoint to your code using a JS keyword:
debugger;
VSCode
Visual Studio Code supports the V8 inspector protocol and it is a great tool for local and remote debugging.
Other IDEs like WebStorm and Atom also support this protocol, use the tool you are most used to.
Some tips
You can also add Logpoints from VS Code
You can have multiple debugging configurations
ndb
It is a Chromium-based, standalone Node.js debugger by the ChromeLabs team with extra features that Chrome Inspector doesn't support out of the box
Child Process Debugging
Blackboxing
Edit in Place
$ npm install -g ndb
llnode
Useful for Post-Mortem debugging
Get useful information from a coredump after a crash
It helps to see the state of the Node process and debug the C/C++ native layer