From the course: Node.js: Real-Time Web with Socket.IO

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Setting up and introduction to the Debug tool

Setting up and introduction to the Debug tool

From the course: Node.js: Real-Time Web with Socket.IO

Start my 1-month free trial

Setting up and introduction to the Debug tool

- [Instructor] Sometimes you work on your application, and you'd like to have a better overview of everything that goes on in the background, especially for debug purposes. This is where the debug built-in tool with Socket.IO comes handy, and you will get more information than you need. So, let's take a look at it. First open your terminal and make sure you are in this directory, so the Chatter, the root directory of your project. Go to View, Integrated Terminal, or whatever tool you're using. The first way to start a debug session is to literally add debug at the beginning of your npm run start command, and we'll do just that. So, Debug, and you want to add =*, and then npm run start. And for Windows folks, you will need to use set DEBUG=* & npm run start. So as you can see, it shows you everything that's happening in the background, and I can just scroll all the way up to where we first start this, right here. So, it's going to say while nodemon is starting, and it's going to listen…

Contents