This repository is supplemental material for the blog post Debugging in Node.js. Please follow along there for further details.
- Make sure you have Node.js installed (I suggest using nvm)
- Clone the repository
- Change to the directory where the repository was cloned (
nodejs-debuggin
). - To run the
console-log.js
code usenode console-log.js
- To run the
built-in.js
code with the built-in Node.js debugger usenode debug built-in.js
- To run the
built-in.js
code with the built-in Node.js inspector usenode --inspect --debug-brk built-in.js
You can run the following commands in your terminal to get started as well:
git clone [email protected]:clarkio/nodejs-debugging.git
cd nodejs-debugging
node console-log.js
The console-log.js
files is to be used for debugging using console.log()
statements throughout the code.
The built-in.js
file is to be used for debugging with the either the Node.js built-in debugger or inspector. It is also later used as part of debugging with Visual Studio Code.