ReSharper 2024.2 Help

Predictive debugger

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 method 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:

Language: C#

Language: VB.NET

Language: C++

Language: HTML

Language: ASP.NET

Language: Razor

Language: JavaScript

Language: TypeScript

Language: CSS

Language: XML

Language: XAML

Language: Resx

Language: Build Scripts

Language: Protobuf

Language: JSON

Feature is available in C#

Feature is not available in Visual Basic

Feature is not available in C++

Feature is not available in HTML

Feature is not available in ASP.NET

Feature is not available in Razor

Feature is not available in JavaScript

Feature is not available in TypeScript

Feature is not available in CSS

Feature is not available in XML

Feature is not available in XAML

Feature is not available in Resource files

Feature is not available in build script files

Feature is not available in Protobuf

Feature is not available in JSON

Last modified: 23 September 2024