Debug node js with Visual Studio Code

When debugging with Visual Studio Code, there are many things you can do when you hit a breakpoint.

In order to go to the "debugging" view, you can either click the "bug" icon on the left or hit Ctrl + Shift + D.

You see Paused on breakpoint. in the Call Stack window. That window includes the callstack and you can double-click the different frames to navigate through the corresponding source.

You can also see the Variables window here to see the values of the variables (local/global/closure/etc.).

One of the more used functionality parts of debugging in VS Code is the debug console. In the debugging view, there's a little icon right next to the configuration that you're using that looks like the CLI character. You can either click that or just do a command palette search (Ctrl + Shift + P) for Debug: open Console. This will bring up the debugging console for your ad hoc debugging commands.

The documentation on VS Code debugging is quite robust, too, so I recommend you take a look at this.


VSCode 0.8.0 has problems with node versions older than 0.12.0. Upgrade to at least 0.12.0 or wait for the upcoming VSCode 0.9.0.