Line-of-code breakpoints: These are positioned on a specific line of code. The debugger suspends execution when the line is run, enabling you to examine variables and the call stack.
Conditional breakpoints: These are line-of-code breakpoints with an associated condition. The debugger suspends execution only if the condition is satisfied.
Function breakpoints: These suspend execution each time a specific function is invoked.
XHR breakpoints: These are activated when an XHR URL contains a pre-determined string.
Event listener breakpoints: These suspend execution each time an event listener of a specific type is activated.
DOM breakpoints: These suspend execution each time a specified DOM node undergoes changes.
Navigating Through Code
Once breakpoints are set, you can navigate through your code:
Step over: This executes the current line and pauses at the subsequent one.
Step into: This runs the current line and delves into any function invoked on that line.
Step out: This runs the remainder of the current function and pauses at the next statement following the function call.
Resume script execution: This resumes code execution until another breakpoint or exception is encountered.
Probing Variables and Observing Expressions
Exploring Call Stack and Scope
The call stack illustrates the execution path that led to the currently executing line of code. The Scope section manifests all local, closure, and global variables available at the current breakpoint.
- JustMyCode: Decode to Master in Application Debugging
- Mastering GDB Core Dump: A Comprehensive Guide to Debugging in C++
- Mastering Xdebug: A Comprehensive Guide to Improve PHP Debugging
- Mastering Atom Debugger: A Comprehensive Guide to Elevate Your Debugging Skills
- 7 Essential Steps on Debugging Python in Visual Studio Code: An In-depth Guide