You can debug Node.js application by using
Core Node.js Debugger
Node.js provides built-in non-graphic debugging tool that can be used on all platforms. It provides different commands for debugging Node.js application.
Write debugger in your JavaScript code where you want debugger to stop.
Now, to debug the above application, run the following command.
The above command starts the debugger and stops at the first line as shown below.
As you can see in the above figure, > symbol indicates the current debugging statement. Use next to move on the next statement.
In the above figure, next command will set the debugger on the next line. The > is now pointing to next statement. Use cont to stop the execution at next "debugger", if any.
you can see that cont command stops at the "debugger".
Trending Tutorials