JetBrains Rider
 
Get JetBrains Rider
Get your hands on the new features ahead of the release by joining the Early Access Program for Rider 2025.1! Learn more

Breakpoints

Last modified: 28 June 2024

Breakpoints let you suspend the program execution at a specific statement and then analyze variables values, call stack, and other program parameters, evaluate expressions, as well as step through the program. In JetBrains Rider, you can work with the following types of breakpoints:

  • Line breakpoints, which you can set at a particular statement in your code. The debugger suspends program execution once the execution reaches this line. Line breakpoints can be set only on executable lines — comments, declarations, and empty lines are not valid locations for line breakpoints.

  • Exception breakpoints suspend the program when the specified exception is thrown. Unlike a line breakpoint, which requires specific source reference, an exception breakpoint applies globally.

  • Method breakpoints suspend the program each time it calls the specified method. Similarly to exception breakpoints, method breakpoints are not displayed in the editor, but only visible and configurable in the Breakpoints dialog (CtrlAlt0B or Run | Debugger Actions | View Breakpoints...) .

  • Data breakpointssuspend the program execution when a marked property of a specific object changes. Data breakpoints are helpful when you observe a change of value and want to figure out which code actually does the change.

You can set breakpoints before you start debugging your program and also when the program is already running under the debugger control (when it is in the debug mode). All breakpoints are saved and will not get lost after you restart JetBrains Rider.

To view all breakpoints in the current solution, use the Breakpoints dialog (CtrlAlt0B or Run | Debugger Actions | View Breakpoints...) . For each individual breakpoint in the list, you can view and change its properties as required.