Debug nodejs applications in chrome dev tools

Its pretty simple to do it. But make sure you use express in your server.js. For reference, PFA link from medium site below.

generally you run using node server.js right?? now make it node –inspect server.js

(or)

node –inspect –debug-brk server.js

then automatically chrome dev tools will open and you put some breakpoints to debug.

If devtools not opened automatically,

chrome://inspect/#devices

and click on inspect on server.js like shown below.

View story at Medium.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s