With ReSharper, you can improve your debugging experience in the editor.
When you suspend execution while debugging your code, you can see the values of local variables, current line expressions, and function returns right in the editor, next to the corresponding code lines.
ReSharper understands the [DebuggerDisplayAttribute], which means that values of types, properties, and fields marked with this attribute will be displayed accordingly in the editor adornments.
Inline debugging is enabled by default, but you can configure, which kinds of values should be displayed using thepage of ReSharper options.
ReSharper can optionally replace the Visual Studio DataTips with its own DataTips, which have a number of distinctions:
- You can search for specific values in the current suspended-execution context. To do so, just start typing when the focus is in the DataTip. Note that the search will only find values in expanded nodes.
- The DataTip disappears not when you remove the mouse pointer, but when you click anywhere outside the DataTip.
- If a type neither has a meaningful
ToString()override nor is it annotated with the
[DebuggerDisplay]attribute, then the presentation of objects of this type in debugger views could be not very informative. In ReSahrper DataTips, you can customize presentation of such objects on-the-fly. To do so, expand the type in the DataTip, right-click on the desired data members and choose Highlight Property:
To use ReSharper DataTips instead of Visual Studio DataTips, enable the corresponding option on the thepage of ReSharper options.