JetBrains Rider 2020.2 Help

Debugging

Debugger is an integral part of JetBrains Rider that allows you to examine the runtime behavior of your application, identify problematic code, and isolate the source of the problem step by step.

Typical debugging steps

  1. Define a run/debug configuration for the application to be debugged.

  2. Set breakpoints in the source code where the potential problem may lie.

  3. Start a debugging session Shift+F9.

  4. When the program execution breaks, step through your code, evaluate expressions, and set watches.

  5. You can also edit your code and continue debugging without restarting. The project will recompile in the background. This works in projects targeting .NET Framework and .NET Core on Windows (except WPF) when Enable Edit And Continue is ticked on the Build, Execution, Deployment | Debugger page of JetBrains Rider settings Ctrl+Alt+S.

    There are cases when modifying the code is not possible and a restart is required. These include changing signatures, modifying generic functions, renamings of any kind, and some more. If this happens JetBrains Rider will make you aware by showing a tooltip.

  6. Resume the debugging session F9 to let the program run to the next breakpoint, if any.

  7. To finish the debugging session, press Ctrl+F2, select Run | Stop in the menu, or click Stop Stop in the Debug window. This will detach the debugger from the application and make the application exit (in case you have run it from JetBrains Rider).

The major part of debugging activities takes place in the Debug window, which becomes available once you start debugging. To open this window, press Alt+5 or select View | Tool Windows | Debug in the main menu.

You may be also interested in the following language- and framework-specific guidelines:

Last modified: 27 November 2020