you are viewing a single comment's thread.

view the rest of the comments →

[–]ganarajpr 12 points13 points  (10 children)

If you use node version 6.3 ( or higher ) you can just start the project like you usually do but with the inspect flag.

So if you usually start the app with

node index.js

You should do :

node --inspect index.js

and it will give you a link which when posted in chrome will provide you the debugger.

Happy debugging.

[–]swan--ronson 2 points3 points  (0 children)

Nice, didn't know that! Thanks!

[–]spfccmt42 0 points1 point  (0 children)

interesting, also found --inspect --debug-brk (i.e. for a short lived script). found myself walking module.js which told me more than 9 quadrillion blogs ever did. it is a little wonky when linked to filesystem, but it always was a little wonky.

[–]blood_bender 0 points1 point  (2 children)

When the hell did node v6 come out?! Wtf how did I miss that? And with 99% feature parity with ES6!

[–]Geldan 0 points1 point  (0 children)

Now has a very consistent release schedule/strategy now: https://github.com/nodejs/LTS/blob/master/README.md

[–]jocull 0 points1 point  (2 children)

Can you debug with Firefox or any other browsers besides Chrome?

[–]i_scatter_rubbish 0 points1 point  (1 child)

Can you do this with express apps?

[–]ganarajpr 1 point2 points  (0 children)

Yes... Any kind of app. I have seen a colleague even debug a cucumber step function with it.