Testing & DebuggingLesson 74Free preview
Node Adv. Debugging
This lesson is part of Node.js · All levels
Summary
This lesson discusses advanced debugging techniques such as using built-in inspectors, programmed breakpoints, and inspections through various transports. You'll learn to use node inspection, chrome://inspect, and inspector modules to set breakpoints from within code. This ability helps to find the cause of bugs that are difficult to see from ordinary ones. (Node.js)
Key points
- Run with the node --inspect or node --inspect-brk to open the Chrome DevTools Protocol.
- Chrome://inspect detects a Node process being inspected on port 9229.
- The inspector module allows setBreakpoint(), Debugger.pause(), and Stepping of code.
- Clauses debugger; it will stop when the process is run with --inspect.
- Ps-breakpoint, step over/into/out, and watch expression help track the execution sequence.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.