Visual Studio Code Archives - wiki

Nodejs Express Debugging using Visual Studio Code

Click the debugger button located in the left side tool bar

setting debugger

Now you can see the debugger window, Click the setting icon and select Nodejs from the list

setting debugger

It will open (Create) a  launch.json, make sure that the program path locating to your app entry point file ( “program”: “${workspaceRoot}/index.js” ) ( in my case it is index.js in your case may be it is app.js or other). Save the file using Ctrl+S

setting debugger

In the bellow screen you can see the automatically created launch configuration file ‘launch.json’

Open your package.js, check the start script is there or not, if it is not there please add it.

setting debugger

Add break point in your code

setting debugger

Click the debugging button

setting debugger

Open your browser and hit the url

setting debugger

 

 

For downloading visual studio code IDE – click here

 

  Like
By bm on August 19, 2016 | Express, NodeJs | A comment?
Tags: , , ,