How to debug a nodejs application? | SoloLearn: Learn to code for FREE!


How to debug a nodejs application?

Hi! Anybody knows how to debug a Web Server application implemented with NodeJS? Any suggestion for a tool?

11/8/2019 8:07:07 AM

Ludovico Iommi

7 Answers

New Answer


To debug node in the browser, type the following: Chrome://inspect Then click on the open node dedicated server On the command line type the following: Node --inspect filename.js,


Insert one or more statement debugger; into your nodejs code where you want to insert breakpoint, then run cmd: node inspect <your node.js> on debug> prompt, type next for next statement execution, or type cont to continue execution. or type repl command for variable evaluation.


o.gak Nodejs run directly from server, debugging codes cannot be viewed from front-end browser Chrome devtool.


Calviղ Thank you for your explanation.:)


VSCode Will let you debug your Node code in user-friendly way


console.log is very useful for me, try to explore more the console methods


A Chrome debug tool? Open the web page in Chrome and push `ctrl + shift + i`.