Visual Studio debugging painfully slow when loading symbols

30,055

Solution 1

In my case, I had a file open in VS that was not part of my current solution (it happened to be an XML file which I had marked with breakpoints for quick-reference). When I removed those particular breakpoints, the issue resolved.

Solution 2

Try any of the following ...

  1. Enable Just My Code
    Go to Tools > Options > Debugging > General
    Check "Enable Just my Code"
    Enable Just my Code

  2. Cache Symbols Locally
    Go to Tools > Options > Debugging > Symbols Browse to local directory (make sure it's not on a network share) Click "Load All Symbols" or run the project to hydrate the cache

    Cache Symbols

  3. Remove Remote Symbol Servers

    When you select a remote symbol server, Visual Studio gives you the following warning:

    The performance of remote symbols stores can vary due to latency, bandwidth, or availability of servers. Debugging performance can be improved by selecting the option to load only specified modules when enabling this server

    After loading your symbol cache, deselect remote symbols servers

    Go to Tools > Options > Debugging > Symbols Deselect "Microsoft Symbol Servers" to prevent Visual Studio from remotely querying the Microsoft servers. Deselect Microsoft Symbol Servers

Further Reading

Stack Overflow

MS Docs

Solution 3

I had the same issue while hosting my project on a local network share. Moving it to my local System reduced Symbol-Loading times by 90%!

Solution 4

As per the comment by rkawano - turning off the Fusion Log can sometimes fix this problem (it did for me). I had enabled the fusion log after reading the following article and then forgot about it. After some time I started experiencing a significant slowdown of visual studio 2013. The symptom is that VS 2013 becomes unresponsive, particularly when ending a debug session. It will also display symbol loading dialogs when loading a project or stopping the debugger (these are not typically shown).

Share:
30,055

Related videos on Youtube

Mark Cassar
Author by

Mark Cassar

An advanced interactive HTML 5 & Flash developer, web designer & developer from Malta having great passion for interactive design & development. Having more than 10 years experience in interactive development, Flash & web development, I can deliver rich interactive solutions using both HTML5 & Flash. Currently holding the position of Creative Director at CasaSoft Ltd.. Using the latest technology available, I'm challenged to push the boundaries in new media with a vision of enhancing the overall level of web in Malta and also engage with foreign international clients. The main core aspect that I value in design and interactive applications is simply quality.

Updated on July 09, 2022

Comments

  • Mark Cassar
    Mark Cassar almost 2 years

    I have an issue which is practically similar to Visual Studio debugging/loading very slow but I haven't managed to find a solution to such a problem.

    I have tried all what is described within that question and still, the symbol loading for the very first time is drastically slow.

    Similarly to the other question, when starting an MVC project, I get several lines within the Output panel which consist of something similar to:

    'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\02ba097f\ab73cbf7\App_Web__headerusermenu.cshtml.ee708ea.myhgafpb.dll', Symbols loaded.
    'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\02ba097f\ab73cbf7\App_Web__layoutcmsbase.cshtml.ce72eb6d.ovoanhe-.dll', Symbols loaded.
    'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\02ba097f\ab73cbf7\App_Web__notificationmessage.cshtml.5346933.9aei7ems.dll', Symbols loaded.
    

    Such entries take around 300 - 500 ms each and these are executed for all the Partial Views we have within the project, which are quite considerable.

    I have tried the solution within the other question but still didn't get any fast response times.

    These are some tests we have made:

    Using IIS Express

    • Loading website initially takes roughly 2 minutes
    • Stopping website and starting again takes around 1 min 45 sec
    • Once the website is running, I press on Load All Symbols (Tools > Otions > Debugging > Symbols > Load all symbols) and then stop project and run again, and it takes much less, round 25 sec. Still, the Load All Symbols button is disabled while the project isn't running, so for the very first time, I would need to wait until the project has loaded in order to press Load All Symbols

    Using Visual Studio Development Server

    • Starting initially, takes roughly 50 sec
    • Stopped project and started again, takes roughly 20 sec
    • Clicking on Load All Symbols, stopping project and starting again takes roughly 15 sec

    This is getting extremely frustrating as it is taking an extremely long amount of time in order to load project for the first time.

    Any possible solution other than those mentioned within the question Visual Studio debugging/loading very slow which might help?

    • cirrus
      cirrus almost 11 years
      I tried just about everything in that other question too, but loading symbols for IISExpress still took an age. Probably more symptom than cause but I noticed nearly all my source symbol requests were 404 so the caching solutions were no help. Similarly though turning off all symbol servers and only loading required symbols didn't resolve my issue either. The one that worked for me was "Delete All Breakpoints".
    • Mark Cassar
      Mark Cassar almost 11 years
      I tried everything and even the "Delete All Breakpoints" still didn't resolve the issue. Can't figure out why this is happening and it is very frustrating as it takes a lot of wasted time until the project loads!
    • cirrus
      cirrus almost 11 years
      I think there's a bunch of different reasons why it can happen. I guess you just have to keep trying everything until you find the magic tweak. Have you tried running IISExpress separately and attaching the debugger? Any different?
    • citykid
      citykid over 10 years
      things i try when debugging becomes unusually slow: Intellitrace on? / Change several debugging options / sometimes DNS resolution to localhost takes 1 second (no idea why), so fetching the first page first takes this second.
    • rkawano
      rkawano almost 10 years
      In my case it was due to FusionLog enabled. If you have enabled FusionLog try to disable it.
    • Dirk Boer
      Dirk Boer over 9 years
      @rkawano same with me: if you make an answer we can upvote it
    • Jean-Paul
      Jean-Paul over 8 years
  • Mark Cassar
    Mark Cassar over 10 years
    The main issue is the first time you load the project and it starts doing this symbol loading. Once the project is running and symbols have been loaded successfully, then it doesn't take so long.
  • Mark Cassar
    Mark Cassar over 9 years
    Mine is not on the local network share but on local file system and the issue still prevails.
  • Mark Cassar
    Mark Cassar over 9 years
    No this isn't the issue neither in my case unfortunately.
  • Eugene S.
    Eugene S. over 9 years
    Just had this happen to me. Had a disabled break point in EDMX xml.
  • Laurie Stearn
    Laurie Stearn over 3 years
    Deselecting "Microsoft Symbol Servers" is a great idea. One assumes there is a periodic check (and out of session update) on the paid versions of VS.
  • John Ranger
    John Ranger about 3 years
    I don't know who has downvoted your valuable comment - The Change of the directory and re-establishing of the cache content solved my problem. Therefore upvoted to counteract the downvote.