PyCharm 2017.3 Help

Breakpoints

Run | View Breakpoints
Ctrl+Shift+F8
debug view breakpoints

Toolbar

ItemTooltip and shortcutDescription
addAdd Breakpoint
Alt+Insert
Click to invoke the list of available breakpoint types and create a new breakpoint.
deleteRemove BreakpointClick to remove the selected breakpoints.
fileTypeTextGroup by FileClick to display breakpoints under their respective files, rather than under their types:
py breakpoint group by file

Breakpoint options

These controls depend on the selected breakpoint type.

OptionDescriptionTypes of breakpoints
EnabledSelect this option to enable breakpoints. If you clear this option, PyCharm will skip the specified breakpoints during the debugging process.
SuspendSelect this option to enable the suspend policy for a breakpoint.

Select one of the radio buttons 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 program execution when a breakpoint is hit.

If this option is deselected, no threads are suspended.

Suspend policy:
  • All: when a breakpoint is hit, all threads are suspended.
  • Thread: when a breakpoint is hit, the thread with this breakpoint is suspended.
  • Make default: click if you want the suspend policy for the selected breakpoint to be used as the default one (only available if the Thread option is selected).
  • Two breakpoints are set at the different methods of a class, and their suspend policy is set to All.
  • When one of the breakpoints is hit, some step actions are performed.
  • If at the time of stepping another thread hits the second breakpoint, PyCharm will not stop there.
Python line breakpoints
Condition Select this checkbox and specify a condition for hitting a breakpoint in the text field.

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 true, user-selected actions are performed.

If the result is false, the breakpoint does not produce any effect. If the Debugger cannot evaluate the expression, it displays the Condition evaluation error message. You can select whether you would like to stop at this breakpoint or ignore it.

To the right of the Condition field, there is the button shift enter button(Shift+Enter) that opens the multiline editor.

All types
Log message to console Select this checkbox if you want a log message to be displayed in the console output when the breakpoint is hit.All types
Evaluate and logSelect this checkbox if you wish to evaluate a certain expression at this breakpoint and to export result to the console output.

To the right of this field, there is the button shift enter button(Shift+Enter) that opens the multiline editor.

If the expression to be evaluated is incorrect when a particular breakpoint is reached, the console output displays an error message:

Unable to evaluate expression <your_expression>

Line breakpoints
Remove once hitSelect this checkbox, if the you want the breakpoint to be deleted after hitting it.All types
Disabled until selected breakpoint is hitFrom the drop-down list, select the breakpoint in question. The option None corresponds to the always enabled breakpoint.

Besides that, you can also choose the behavior of this breakpoint, when the selected one is hit:

  • Disable again
  • Leave enabled
All types
Activation policy
On terminationThe 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 filesIf 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

CommandDescription
Move to groupPoint 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 descriptionChoose 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.
    py breakpoint search

    PyCharm highlights the line with the matching address or description.

Last modified: 28 March 2018

See Also