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

Step through code

Last modified: 10 October 2024

In a suspended program, you get control over the program execution. By stepping through the program, you can advance the execution point to the code you are interested in and examine the program state at this point.

When the code is running in debug mode, there are two ways to suspend it:

  • Set breakpoints in the code that you want to examine and wait until one of them is hit.

  • Break program execution with CtrlAltBreak. The debugger will finish the statement that is executing at the moment you pause, and then stop at the statement that should be executed next.

In the suspended state, the current execution point — the next statement to be executed — is marked with a yellow execution pointer Execution pointer in the left-hand gutter of the editor. To quickly find the current execution point, press AltNumPad * or click Show Execution Point Show Execution Point in the Debug window.

All stepping commands are available in the Run menu, via shortcuts, and with buttons on the Debug window toolbar:

JetBrains Rider: Stepping buttons on the Debug window toolbar

Below is a brief summary of all stepping commands.

To finish the debugging session, press ShiftF5, select Run | Stop in the menu, or click Stop Stop in the Debug window.