ReSharper 2017.3 brings the debugger into the editor

While debugging, we often have to work with lots of information. We have the autos, locals and watches tool window to look at, code in our editor, … This overdose of information and switching between looking at code and at tool windows often messes with the mental context of the debugging session in our brains.

No more! With ReSharper 2017.3 EAP, we are proud to bring one of Rider’s features into Visual Studio: local variables, current line expressions and function returns are now displayed inside the editor! On top of that, we’re adding searchable DataTips!
Display variables from debugger in the editor

Instead of having to switch between looking at variables in a tool window, we can now see the content of local variables, current line expressions and function return values inline in the editor.

ReSharper visualizes values based on the information it has available. When a class is annotated with the DebuggerDisplayAttribute attribute, ReSharper will use it instead. So for example if we add a DebuggerDisplay attribute to a Person class, we can have ReSharper visualize our type based on some of its properties:
Using DebuggerDisplay attribute to specify how ReSharper visualizes variable in editor

Keep in mind that Rider‘s debugger provides very similar features – check out our series about Rider’s debugger to learn more!

Using ReSharper DataTips

ReSharper comes with its own debugger DataTips as well. We can access them by clicking the inline value display, or by replacing the Visual Studio DataTips from the ReSharper settings under Tools | Debugger:
ReSharper debugger DataTips

The ReSharper DataTips make it easier to search for a specific value. For example if we load the list of people from a file and want to check a given person is in there, we can expand the collection and then start typing to search through. Note that searching is only possible in expanded nodes.
Searchable DataTips in the debugger

Configuring ReSharper debugger tools

These new debugger tools come with several configuration options. From the ReSharper settings under Tools | Debugger, we can toggle the different elements that can be shown in the editor:
Configugre debugging tools settings

In case you prefer not to display local variables, current line expressions and function return values inline in the editor, the entire feature can be toggled under General | Product & Features, then Debugger Integration.

Download ReSharper 2017.3 EAP and give it a try! We’d love to hear your feedback on the new ReSharper debugger tools!

This entry was posted in How-To's and tagged , , , , . Bookmark the permalink.

29 Responses to ReSharper 2017.3 brings the debugger into the editor

  1. Richard Moss says:

    That looks awesome, although I’m sure the OzCode folks are less enthusiastic. One of the reasons I love OzCode so much is it’s datatip doesn’t disappear at the drop of a hat the way Visual Studio’s do – are your improved data tips similarly minded? (I realise I could install the EAP, but I don’t like rocking my IDE’s boat so I won’t)

    Regards;
    Richard Moss

  2. Richard says:

    A small typo in that last screen-shot: “funtion” should be “function”.

    (“Show funtion return values in editor”)

  3. Martin says:

    This feature is awesome!
    When I first noticed it (a day before this blog)

    I was like huh? What is that? Then I realized what was going on and immediately enjoyed having this while stepping through a unit test.

    Thank you very much for this great feature!

    PS: I was so happy to have this, I showed it to my girlfriend who is not a programmer :-)

    • Thanks for your kind words Martin!

      • Marcin says:

        I installed the update today without reading the change log, and it was such a great surprise. Additional information started to appear during difficult debugging session, and it saved so much time and frustration. I think that in this particular case I wouldn’t be able to push the fix today if I hadn’t got this aid. :)

  4. Sven says:

    Great feature! :)

    If you would add an on the fly possibility to mark properties you would like to use as DebuggerDisplayAttribute, like what OzCode does, you would make a lot of people happy.

    Sometimes you do not have the source code to set the DebuggerDisplayAttribute or sometimes it changes depending on what to debug what I need to see from an object without clicking through the propertylist.

  5. Hey guys, you have developed a great product which I am using for the past 8 years. I keep track of your progress and ReSharper is getting better and better.
    Can I ask you to add RSS feed for the EAP page so I can get notifications for the new versions of the product (https://www.jetbrains.com/resharper/eap/). Thank you!

  6. Ádám Szörényi says:

    Amazing features, can’t wait for the stable version :)

  7. Alex says:

    Hello! Excellent functionality! One question: how can I change the background color of the DataTip. On my theme (Dark with light editor) is not very well seen the values of variables

  8. HamRusTal says:

    As per https://www.jetbrains.com/resharper/eap/ “Build 2017.3 EAP 6 … Introduced debugging support in ReSharper and ReSharper C++” but I see neither the “Options | Tools | Debugger” item nor the actual DataTips when only having “ReSharper C++” installed (did not check the greater ReSharper). Is the announcement wrong? Is the full ReSharper required to use this feature in C++?

    • Igor Akhmetov says:

      Unfortunately full ReSharper is required, but this will be fixed in a future EAP build. Thanks for letting us know!

  9. Sam says:

    Very cool. These features are very helpful. I love them in OzCode.

    Definitely sad for the OzCode guys though; I don’t see how they can compete now as these were their primary features. They definitely still have more features, but buying that extra extension just became a little bit harder of a sell.

Leave a Reply

Your email address will not be published. Required fields are marked *