DevTools Tips: Breakpoints and logpoints
Stay organized with collections
Save and categorize content based on your preferences.
Breakpoints let you pause your code in the middle of its execution, on an optional condition, and examine all values at that moment in time. Logpoints let you log messages to the Console without pausing the execution. Breakpoints and logpoints are an efficient alternative to debugger;
statements and console.log()
calls in your code.
Watch the video to learn how to use breakpoints and logpoints to debug your code:
- Set a breakpoint with a click.
- View the Call Stack, inspect variables, and edit their values in Scope and the Console.
- Right-click > Ignore third-party scripts.
- Disable pausing on
debugger;
statements.
- Add a condition to pause on.
- Log values to the Console without pausing.
- Set the Debugger to pause on caught or uncaught exceptions.
To learn more about breakpoint types, see Pause your code with breakpoints.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-07-27 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-07-27 UTC."],[],[]]