Breakpoints
Ctrl+Shift+F8
Breakpoint options
Use the toolbar buttons to add or remove breakpoints, and group them by package, file or class.
The options depend on the selected breakpoint type:
Option | Description | Types of breakpoints |
---|---|---|
Enabled | Select this option to enable breakpoints. If a breakpoint is disabled, PyCharm will skip it during the debugging process. | |
Suspend | Select this option to enable the suspend policy for a breakpoint. Select one of the options to specify the way a program is paused when a breakpoint is reached. If you work with JavaScript breakpoints, you only need to specify whether you want to suspend the program execution when a breakpoint is hit. If this option is deselected, no threads are suspended.
| Python line breakpoints |
Condition | Select this checkbox and specify a condition for hitting the breakpoint. A condition is a Boolean expression. This expression should be valid at the line where the breakpoint is set, and is evaluated every time the breakpoint is reached. If the evaluation result is If the result is | All types |
Log to console | Select if you want to log the following events to console:
| All types |
Evaluate and log | Select this checkbox if you wish to evaluate a certain expression at this breakpoint and to export the result to the console output. Press Shift+Enter to open the multiline editor. | Line breakpoints |
Remove once hit | Select if you want the breakpoint to be deleted after it was hit. | All types |
Disable until breakpoint is hit | From the drop-down list, select the breakpoint in question. The None option corresponds to the always enabled breakpoint. Besides that, you can also choose the behavior of this breakpoint, when the selected one is hit:
| All types |
Activation policy | ||
On termination | The Debugger stops when the process terminates with this exception. | Python exception breakpoints |
On raise | If this option is selected, the Debugger stops on throwing an exception. So doing, the Debugger stops only on the first place where the exception has been thrown. | Python exception breakpoints |
Ignore library files | If this checkbox is selected, the debugger does not stop at the exceptions thrown inside libraries. If this checkbox is not selected, the debugger stops at the location in a library file, where the exception is thrown. | Python exception breakpoints |
Context menu commands
Command | Description |
---|---|
Move to group | Point to this command to move the selected breakpoint to a new group, to one of the existing groups (<group name> ), or out of a group (<no group> ). |
Edit description | Choose this command to enter or change description of a breakpoint. |
Speed search of a breakpoint
To find a particular breakpoint
- Start typing address or description of the target breakpoint.
PyCharm highlights the line with the matching address or description.