How to Debug Node.js Code with Visual Studio

2016/1/311 min read
bookmark this

How to debug node.js app in visual studio.

Scott already wrote blog in 2013 about the node.js tools for visual studio, so more detail information you can find at here Introducing node.js Tools for Visual Studio. This blog shows how to run debug in practise. 

First, you need to install node.js tools for your visual studio, go to following page to download, and assume you already installed node.js and visual studio.

NodejsTools For Visual Studio

Next, and the final step, let's debug.

Open your node.js project, and click browser (following example, click Google Chrome).

nodejs tools will use node.exe to open another port for start debug your node.js app.

There you go, you are done. You can use visual studio's debug tools now.

More info about node.js debug at visual studio, please reference following.