Learn how to configure Visual Studio Code to launch Node applications in debugging mode, then toggle breakpoints and edit variables from within the editor.
- [Instructor] We've seen both…Node Inspect and Chrome DevTools,…so how does VS Code's built-in…Node debugging support size up?…We're gonna have to do a little bit more work…to get Visual Studio Code debugging.…Again, make sure that you stop web…in PM2 if you haven't already.…Then, we'll need to edit the launch configuration…so VS Code knows where it should be starting…and where to log.…Finally, we'll use VS Code to start Node…in debugging mode and control execution.…Let's get started.…
Switch over to VS Code.…The first thing we're gonna want to do…is to stop web in PM2, so open up the terminal,…type pm2 stop web.…The process is now stopped.…Close the terminal again.…Navigate up to the debug menu,…and select open configurations.…We'll be prompted for an environment.…Select Node.js.…This generates a new file in the .vscode folder…named launch.json.…
If we look at the program path,…it just says workspaceFolder/index.js.…That's fine, except our server is somewhere else.…Let's edit the configuration.…Left-click before the index.js, and add servers/web/.…
- Building a troubleshooting mindset
- Why measure performance?
- What's a microservice architecture?
- Managing microservices with PM2
- Effective logging strategies
- Debugging Node.js applications
- Benchmarking performance
- Profiling code execution
- Knowing what to optimize
Skill Level Intermediate
Node.js: Deploying Applicationswith Kirsten Hunter1h 24m Intermediate
Building RESTful Web APIs with Node.js and Expresswith Emmanuel Henri1h 40m Intermediate
1. Build a Troubleshooting Mindset
2. Introducing Microservices
3. Effective Logging Strategies
4. Debugging Node.js Applications
Debugging isn't just logging3m 51s
5. Measuring Performance
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.