none
Serious delay "evaluating local variables"

    Question

  • I'm sure it serves a very important function, but Visual Studio 2017 is REALLY REALLY frustrating the hell out of me now that it spends 45 seconds "evaluating local variables" when it hits an exception during debugging.  And it might do this two or three times depending on what I do while analyzing the exception.

    I've enabled/disabled every feature under Options -> Debugging to no avail.

    I've disable Application Insights and Diagnostic Tools, neither seems to be the culprit.

    From my perspective, this is a REAL STEP BACKWARDS.

    Monday, December 11, 2017 3:50 PM

All replies

  • Not sure which exact update of VS 2017 you are using, the latest one is 15.5, you update it if it's not.

    Temporary solution could be to deactivate diagnostic tools:

    Tools -> Options -> Debugging -> General (Uncheck "Enable Diagnostic Tools while debugging")

    Of course, you could also go to Help -> Send Feedback -> Report a problem to VS developing directly, they evaluate this issue and fix it in the next update.

    Your understanding and cooperation will be grateful.

     

    Regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, December 12, 2017 3:10 AM
  • Hi,

    Please try to the following steps.
    (1) reset of your settings:
       Visual Studio 2017 Reset Settings
       https://stackoverflow.com/questions/46837696/visual-studio-2017-reset-settings

    If (1) won't work as you expect, do
    (2) Repair Visual Studio 2017
        https://docs.microsoft.com/en-us/visualstudio/install/repair-visual-studio

    Regards,

    Ashidacchi

    Tuesday, December 12, 2017 6:52 AM
  • This might help.

    I've had the same problem this week. I've tried everything else on this page, but fortunately it also eventually crashed with code (0x800703e9).

    Work-around is to change Tools>>Options>>Debugging and DESELECT "Enable property evaluation and other implicit function calls".

    Details below in separate message.

    Wednesday, December 13, 2017 2:55 PM
  • I tried other things on this page and they did not work.

    Visual Studio 2017 15.5.1
    C# with .Net 4.6
    I upgraded to Windows 10 a couple weeks ago, then installed Visual Studio.
    Stepped into a constructor and each initializer.
    A message box with "Evaluating local variables" displayed for a many minutes.  When I cancelled, message went away but I had to use "Task Manager" to kill my dev process.

    What worked for me

    Fortunately I tried to NOT step into the constructor and crash occurred with error (0x800703e9).

    Found this link which describes a work-around https://blogs.msdn.microsoft.com/updownroundnround/2009/10/02/debuggee-process-terminated-abruptly/

    Work-around is to change Tools>>Options>>Debugging and DESELECT "Enable property evaluation and other implicit function calls".

    Don't Know Why This Works

    The other members of my team do not have this problem, so something else is different in my configuration. For now, I'm happy to be debugging again.


    • Proposed as answer by Rickerj135 Wednesday, December 13, 2017 3:11 PM
    • Edited by Rickerj135 Wednesday, December 13, 2017 3:17 PM Correction
    Wednesday, December 13, 2017 2:57 PM
  • Mine is a fresh install of Window 10, fresh FULL install of VS 2017.

    I came in this morning to find my Visual Studio was sitting at the "Would you like to recover your files" screen.

    Checking Event logs, I find that Window Update forced a reboot of my machine last night.What I immediately notice is this issue has disappeared.  Either due to the updates or due to the machine rebooting and allowing some back end VS process responsible for "evaluating local variables" to begin working again. 

    I've taken a snapshot of running processes under working conditions and if I encounter the issue again, I am going to take another snapshot and make comparisons to see what I can find out.

    Regards Rickerj135's work-around to change Tools>>Options>>Debugging and DESELECT "Enable property evaluation and other implicit function calls".  I will definitely keep this in mind to try. One thing I do notice when doing this, when an exception is thrown and the Exception Thrown dialog pops up over it, clicking the View Details link opens a QuickWatch window and if you expand the $exception object all of its properties say "Implicit function evaluation is turned off by the user".  So you may be onto something there Rickerj.  I'm betting there is some back end process at work for this window and it crashes or goes hinky, causing variable evaluation to stop functioning...so disabling the feature altogether avoids trying to call on that process....just a guess.   Hopefully the VS Experience Improvement reports the IDE should be communicating up to MS will help them figure this out.

    Wednesday, December 13, 2017 5:23 PM
  • Sorry about this issue brought you such inconvenience.

    Not sure if any reply could work around it in your side, please help to mark it as answer if it does.

    I also hope the Visual Studio Developing team could make VS better for us in the upcoming update.

    Your understanding and cooperation will be grateful.

     

    Regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, December 14, 2017 9:28 AM
  • I tried the workaround but it didn't work for me.

    I get this message simply trying to debug a unit test. I get the message "The debugger is unable to evaluate this expression" for one variable and "Internal error in the C# compiler" for the other variable.  Clicking continue takes me to a "The application is in break mode" window. 

    VS 2017 v15.5.2

    .Net Framework 4.6.1


    • Edited by TANSTAAFL53 Friday, January 12, 2018 9:52 PM
    Friday, January 12, 2018 9:51 PM
  • Hi Fletcher,

    I've got a fresh install of the latest Visual Studio 2017 15.6.0, and the problem is here. Workarounds do not help. Debugging is a pain!

    Monday, March 12, 2018 10:52 AM
  • Hi All

    I had the same problem with a Command Line C# program with lots of threads and after installing 15.6.6 it looks like the problem has gone away and it is back to normal debugging speed. 

    Hopefully it is the same for everyone else.

    Cheers

    Wayne

    Sunday, April 15, 2018 7:24 AM
  • I'm afraid this is also happening for me in VS 2017, version 15.7.1 while working with VB.NET code. Disabling ReSharper seems to have helped though.
    • Edited by JoaCHIP Wednesday, May 16, 2018 2:33 PM
    Wednesday, May 16, 2018 2:10 PM
  • Only one thing that helped me was disabling Debugger option of Resharper. If you use Resharper, try to UNCHECK "Show local variables values in editor" in menu: Resharper -> Options -> Tools -> Debugger.

    Tuesday, October 9, 2018 8:55 AM
  • Thank you. I have no idea about how it started and what that option actually do, but works for me.
    Friday, November 9, 2018 12:03 PM