Debug Datatips not expanding for FamilyInstance

Debug Datatips not expanding for FamilyInstance

RPTHOMAS108
Mentor Mentor
127 Views
0 Replies
Message 1 of 1

Debug Datatips not expanding for FamilyInstance

RPTHOMAS108
Mentor
Mentor

I noticed while debugging in Revit 2025 (VS 2022) that the Datatips for items of FamilyInstance were not expanding and I had to use AddWatch. I found it was due to the below debug setting being enabled. So I'm adding it here for future reference as it is quite a vague setting to uncheck.

 

Debug>Options>General>Enable fast expression evaluation (Managed only)

 

This is what CoPilot says about the setting:

The 'Enable fast expression evaluation' option in Visual Studio allows the debugger to quickly evaluate expressions in managed code (C# or VB) during break mode, but it may restrict certain complex operations like custom visualizers from functioning correctly.
What It Does
When enabled, Visual Studio’s debugger prioritizes fast, low-overhead evaluation of expressions in the Immediate window, Watch window, QuickWatch dialog, and other debugger interfaces for managed code.

 

This means:

Expressions are computed quickly during break mode without fully executing all underlying code.
The debugger is optimized to avoid side-effect-inducing evaluations that might alter application state.
Common debug operations, such as inspecting variable values, evaluating conditions in breakpoints, and viewing collection data, are accelerated.


Limitations and Considerations
While fast evaluation improves performance, it comes with trade-offs:
Certain complex types or custom visualizers may fail. For example, visualizers that attempt to expand objects of type MethodBase might show an 'Internal Error evaluating expression' when this option is enabled. In such cases, disabling fast expression evaluation allows full evaluation and restores visualizer functionality.
Some debugger expressions that require full method execution, dynamic casting, or advanced runtime analysis may not work properly due to the restricted evaluation context in fast mode.
The option primarily affects managed languages like C# and VB. Native C++ work usually remains unaffected.


When to Disable It
If you need full-featured evaluation, such as using custom visualizers or debugging library code that requires method invocations, turn off 'Enable fast expression evaluation (Managed only)'.
If you prioritize speed and minimal impact on program state during debugging, keep it enabled. This is ideal for large datasets or frequently evaluated expressions where performance is more important than accessing every custom detail.
How to Access the Setting
Open Tools > Options in Visual Studio.
Navigate to Debugging > General.
Find the option labelled 'Enable fast expression evaluation (Managed only)'.
Check or uncheck it depending on your debugging needs.
In summary, 'Enable fast expression evaluation' is a performance-oriented setting designed to accelerate expression evaluation in managed code while debugging. However, it may limit certain debugging features and visualizers, so toggling the option depends on whether speed or full evaluation capability is more critical for your workflow

 

Although it may have just stopped working due to a VS update and will work in the next one...who knows. Kind of strange because it only failed on FamilyInstance and I spent most of the time wondering if symbols were loaded etc.

0 Likes
128 Views
0 Replies
Replies (0)