ReSharper
 
2023.2
Get ReSharper
You are viewing the documentation for an earlier version of ReSharper.

Predictive debugger

Last modified: 04 August 2023

When you debug a program, you normally see its current state and can analyze code that has already been executed. So when you step into a function, you don't see what happens inside its body until you apply additional stepping actions.

With predictive debugger, you can see what happens after the current statement without any stepping. It executes the code in the background and provides you with the following insights:

  • Show expected values of the variables.

  • Visually 'mute' parts of the program that will not be executed.

  • Warn you that further execution will end with an exception.

ReSharper: Predictive debugger

To enable or disable the predictive debugger, select Show predicted values on the Tools | Debugger | Editor Integration page of ReSharper options ( Alt+R, O ).

When the predictive debugger is enabled, ReSharper starts predicting values automatically as soon as the program breaks. In contexts with lots of variables, this may have a slight negative effect on stepping performance.

You can also opt to run the predictive debugger manually by clearing the Start predictive debugger automatically checkbox on the Tools | Debugger | Editor Integration page of ReSharper options ( Alt+R, O ).

When this option is disabled, you will be able to click Run predictive debugger on the line with the current statement to run the predictive debugger from the editor when needed:

ReSharper: Run predictive debugger

This feature is supported in the following languages and technologies: