none
Loading symbols very slow while debugging

    Question

  • Good day,
    I have an ASP.NET application that isn't too big, 10 pages and a moderate amount of code behind. When I run the app in debug mode it takes over a minute to load the symbols, about 75 seconds consistently, which seems excessive to me. This of course leads to the issue of the browser doesn't open until the symbols are done.

    Here are some particulars concerning my environment. The machine is a P4 2.8 with plenty of resources. I haven't had any issues with it recently. I recently installed SP1 for VS2005. I also have VS 2003 on the same machine and it runs fine and takes about one second to load all of the symbols. The debugging is only local on the one machine. When I start the app without debugging (CTRL-F5) it starts up in about a second or two. This is how I have been debugging recently rather than stepping through code. Just trading one source of pain for another. I did try running the install of VS2005 again in maintenance mode with no change in performance.

    Below is the text from the Modules window is VS2005. Sorry for is being so mangled. Having read, it feels like, every post in here that seemed to have anything to do with this issue, I don't think there is anything unusual here. Thanx for any assistance you can provide.

    mscorlib.dll C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll Yes No Skipped loading symbols.  1 2.0.50727.42 (RTM.050727-4200) 1/10/2007 2:15 PM 790C0000-79BA6000 [3696] WebDev.WebServer.EXE: Managed 

     WebDev.WebServer.EXE C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.EXE Yes No Skipped loading symbols.  2 8.0.50727.762 12/2/2006 5:36 AM 00400000-00420000 [3696] WebDev.WebServer.EXE: Managed 

     WebDev.WebHost.dll C:\WINDOWS\assembly\GAC_32\WebDev.WebHost\8.0.0.0__b03f5f7f11d50a3a\WebDev.WebHost.dll No No Cannot find or open the PDB file.  3 8.0.50727.42 9/23/2005 5:20 AM 5DED0000-5DEE0000 [3696] WebDev.WebServer.EXE: Managed 

     System.Windows.Forms.dll C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll Yes No Skipped loading symbols.  4 2.0.50727.42 (RTM.050727-4200) 1/10/2007 2:17 PM 7AFD0000-7BC56000 [3696] WebDev.WebServer.EXE: Managed 

     System.dll C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll Yes No Skipped loading symbols.  5 2.0.50727.42 (RTM.050727-4200) 1/10/2007 2:16 PM 7A440000-7ABFE000 [3696] WebDev.WebServer.EXE: Managed 

     System.Drawing.dll C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll Yes No Skipped loading symbols.  6 2.0.50727.42 (RTM.050727-4200) 1/10/2007 2:17 PM 7ADE0000-7AF74000 [3696] WebDev.WebServer.EXE: Managed 

     System.Web.dll C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll Yes No Skipped loading symbols.  7 2.0.50727.210 (QFE.050727-2100) 1/10/2007 5:25 PM 65F20000-66A72000 [3696] WebDev.WebServer.EXE: Managed 

     System.Configuration.dll C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll Yes No Skipped loading symbols.  8 2.0.50727.42 (RTM.050727-4200) 1/10/2007 5:25 PM 64890000-6497E000 [3696] WebDev.WebServer.EXE: Managed 

     System.Xml.dll C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll Yes No Skipped loading symbols.  9 2.0.50727.42 (RTM.050727-4200) 1/10/2007 2:18 PM 69BE0000-6A148000 [3696] WebDev.WebServer.EXE: Managed 

     System.Web.RegularExpressions.dll C:\WINDOWS\assembly\GAC_MSIL\System.Web.RegularExpressions\2.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll Yes No Skipped loading symbols.  10 2.0.50727.42 (RTM.050727-4200) 1/10/2007 5:25 PM 69890000-698D0000 [3696] WebDev.WebServer.EXE: Managed 

     Microsoft.JScript.dll C:\WINDOWS\assembly\GAC_MSIL\Microsoft.JScript\8.0.0.0__b03f5f7f11d50a3a\Microsoft.JScript.dll No No Cannot find or open the PDB file.  11 8.0.50727.42 9/23/2005 2:34 AM 5E600000-5E6BA000 [3696] WebDev.WebServer.EXE: Managed 
     VJSharpCodeProvider.dll C:\WINDOWS\assembly\GAC_32\VJSharpCodeProvider\2.0.0.0__b03f5f7f11d50a3a\VJSharpCodeProvider.dll Yes No Skipped loading symbols.  12 2.0.50727.42 (RTM.050727-4200) 1/10/2007 5:25 PM 6C3B0000-6C3D8000 [3696] WebDev.WebServer.EXE: Managed 

     CppCodeProvider.dll C:\WINDOWS\assembly\GAC_MSIL\CppCodeProvider\8.0.0.0__b03f5f7f11d50a3a\CppCodeProvider.dll No No Cannot find or open the PDB file.  13 8.0.50727.762 12/2/2006 5:23 AM 5B300000-5B31C000 [3696] WebDev.WebServer.EXE: Managed 

     App_Code.lpt2etxi.dll C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pir\d052f938\180a09a1\App_Code.lpt2etxi.dll No Yes Symbols loaded. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pir\d052f938\180a09a1\App_Code.lpt2etxi.pdb 14 0.0.0.0 2/28/2007 8:29 AM 00D50000-00D5C000 [3696] WebDev.WebServer.EXE: Managed 

     Microsoft.VisualBasic.dll C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualBasic\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll Yes No Skipped loading symbols.  15 8.0.50727.42 (RTM.050727-4200) 1/10/2007 5:24 PM 5E410000-5E5BC000 [3696] WebDev.WebServer.EXE: Managed 

     System.Data.dll C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll Yes No Skipped loading symbols.  16 2.0.50727.42 (RTM.050727-4200) 1/10/2007 2:16 PM 65140000-657A8000 [3696] WebDev.WebServer.EXE: Managed 

     App_global.asax.7xffqv5i.dll C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pir\d052f938\180a09a1\App_global.asax.7xffqv5i.dll No Yes Symbols loaded. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pir\d052f938\180a09a1\App_global.asax.7xffqv5i.pdb 17 0.0.0.0 2/28/2007 8:29 AM 00DB0000-00DBA000 [3696] WebDev.WebServer.EXE: Managed 

     ExceptionHandler.DLL C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pir\d052f938\180a09a1\assembly\dl3\7639dd36\00e51216_78cfc601\ExceptionHandler.DLL No No Cannot find or open the PDB file.  18 1.0.2437.19305 9/3/2006 10:43 AM 11000000-11008000 [3696] WebDev.WebServer.EXE: Managed 

     System.Web.Mobile.dll C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll Yes No Skipped loading symbols.  19 2.0.50727.42 (RTM.050727-4200) 1/10/2007 5:25 PM 695A0000-697DA000 [3696] WebDev.WebServer.EXE: Managed 

     App_Web_go2nuzei.dll C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pir\d052f938\180a09a1\App_Web_go2nuzei.dll No Yes Symbols loaded. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pir\d052f938\180a09a1\App_Web_go2nuzei.pdb 20  2/28/2007 8:30 AM 00E00000-00E28000 [3696] WebDev.WebServer.EXE: Managed 

     App_Web_iccp.master.cdcab7d2.cycmyovv.dll C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pir\d052f938\180a09a1\App_Web_iccp.master.cdcab7d2.cycmyovv.dll No Yes Symbols loaded. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pir\d052f938\180a09a1\App_Web_iccp.master.cdcab7d2.cycmyovv.pdb 21 0.0.0.0 2/28/2007 8:29 AM 044B0000-044BE000 [3696] WebDev.WebServer.EXE: Managed 

     System.Transactions.dll C:\WINDOWS\assembly\GAC_32\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll Yes No Skipped loading symbols.  22 2.0.50727.42 (RTM.050727-4200) 1/10/2007 5:25 PM 67AF0000-67B9C000 [3696] WebDev.WebServer.EXE: Managed 

    Wednesday, February 28, 2007 3:32 PM

Answers

  • Hi All,

    You can speed up loading of symbols by doing the following:

    1. Verify that you haven't specified any network shares under Tools->Options->Debugging->Symbols especially to server that do not exist anymore. This will require timeouts.

    2. Verify and check that _NT_SYMBOL_PATH or _NT_ALT_SYMBOL_PATH is set to network shares as cg60611 pointed out above.

    3. Specify a local cache for symbols in Tools->Options->Debugging->Symbols. After you have downloaded symbols once from network shares you can disable those locations. Symbol loading will go a lot faster after the first attempt.

    4. Do not specify any symbol lookup paths at all eithe in environment variable and specify paths in the options page but specify that they be used for manual loading. You can then manually load symbols for modules you care about either via the context menu in callstack or the modules window.

    5. VS 2008 SP1 has made a few improvements in this area. It allows for cancelling loading of symbols as it is happening. This will allow you to get to your debug session much faster. Note that this is currently in Beta.

    Hope this helps.

    Azeem Khan
    VS Debugger. 
    Monday, June 09, 2008 5:17 PM

All replies

  • Is there any other information I can provide in order for someone to give me some ideas on what may be causing this behavior. It appears to be getting worse. It now takes over two minutes for it to load symbols.

    Thanx!

    Friday, March 02, 2007 12:55 AM
  •  

    Another user describes a similar problem here:

    http://www.opcode.co.uk/blog/?p=11

    I'll reproduce the text of that post here:

    --------------------------------------------------------

    I don’t know if I’ve been spoilt by the lazy symbol loading in WinDbg, but it seems incredibly slow to start up unmanaged processes under Visual Studio 2005. It spends a huge amount of time attempting to load symbols for every single DLL that gets loaded. As far as I can tell it doesn’t do any caching or recording of the fact that symbols aren’t available for specific binaries. It just blindly tries every time.

    Anyway, I’ve found a way to improve matters slightly. It turns out you can use the symbol server DLL - symsrv.dll - from the most recent version of WinDbg (6.6.3.5 at the last check) to replace the version that ships with Visual Studio 2005.


    One of the additional features that the WinDbg version offers in the exclusions list. You can use this to avoid loading symbols for anything other than the DLL under test. Simply copy the DLL into C:\Program Files\Microsoft Visual Studio 8\Common7\IDE and create a symsrv.ini file with the following contents:

    [exclusions]
    *.*

    This should make your symbol loading fly… yet it still loads the symbols required to debug as normal. Magic!
    -------------------------------------------------------

    Good luck.

     

     

    Tuesday, March 06, 2007 4:10 PM
  •  

    I was having the same problem, and I found the culprit.

    _NT_SYMBOL_PATH was configured to retrieve symbols from the internet:

    _NT_SYMBOL_PATH=SRV*c:\temp\windbg_symbols*http://msdl.microsoft.com/download/symbols

    However, my internet connection requires a proxy server, which I had not set up in IE.

    As the debugger was loading each dependent dll, it was apparently timing out the connection to msdl.microsoft.com.

    As soon as I configured the IE proxy connection and got a working internet connection, the dll loading times returned to normal (and the symbols got cached in c:\temp\windbg_symbols).

     

    Tuesday, March 06, 2007 5:06 PM
  • I find clearing the breakpoints solves the problem.

    Daniel Hefez.

    dhefez
    • Proposed as answer by Ralph Stefan Tuesday, September 02, 2008 2:44 PM
    Wednesday, June 04, 2008 6:27 PM
  • Hi All,

    You can speed up loading of symbols by doing the following:

    1. Verify that you haven't specified any network shares under Tools->Options->Debugging->Symbols especially to server that do not exist anymore. This will require timeouts.

    2. Verify and check that _NT_SYMBOL_PATH or _NT_ALT_SYMBOL_PATH is set to network shares as cg60611 pointed out above.

    3. Specify a local cache for symbols in Tools->Options->Debugging->Symbols. After you have downloaded symbols once from network shares you can disable those locations. Symbol loading will go a lot faster after the first attempt.

    4. Do not specify any symbol lookup paths at all eithe in environment variable and specify paths in the options page but specify that they be used for manual loading. You can then manually load symbols for modules you care about either via the context menu in callstack or the modules window.

    5. VS 2008 SP1 has made a few improvements in this area. It allows for cancelling loading of symbols as it is happening. This will allow you to get to your debug session much faster. Note that this is currently in Beta.

    Hope this helps.

    Azeem Khan
    VS Debugger. 
    Monday, June 09, 2008 5:17 PM
  • This was the solutions to my problems. 
    Two days before this situation started to happend, i've attach another program to the current solution, so I could reuse a Visual Studio instance, and set a breakpoint on a DLL and debbuged. 
    When returning to a normal debug of the program in question, the breakpoint was still there to a DLL that wasn't anymore. The Visual Studio tried to scan all symbols for the funtion with no sucess. So, clearing those bad breakpoint solved the problem.
    Saturday, February 06, 2010 12:58 PM
  • Delete Breakpoints

    I had simialr problems. VS 2008 taking too much time (2 minutes) to load the debug version of my program. I jsut deleted all break-points, now it takes only 5 seconds.

    Wednesday, July 07, 2010 6:20 PM
  • Looks like the symbol server is just being slow and timing out. The following worked like a charm:

    set _NT_SYMBOL_PATH=

    This clears the symbol path.

    Wednesday, October 27, 2010 8:23 PM
  • I ran into this same thing, and I realized i had added a new breakpoint for a function that didn't exist. (Debug... New Breakpoint... Break At Function). Project built normally, but took 3-5 minutes to load the symbols. Doing a "Debug... Delete All Breakpoints" cleared the issue.
    Tuesday, November 02, 2010 6:47 PM
  • I ran into a similar thing and Delete All Breakpoints worked like a charm.
    Tuesday, November 23, 2010 6:34 AM
  • Delete All Breakpoints worked for me also ! Amazing ! Thanks you.
    Monday, January 03, 2011 4:24 PM
  • Delete All Breakpoints worked for me as well. Now the question is, why? Maybe the experts can chime in.
    Monday, July 25, 2011 1:57 PM
  • Thank you Azeem , you saved me lots of time :)))
    Monday, April 02, 2012 3:14 PM
  • I had the problem of extremely slow loading of symbols (about 90 seconds) while developing/debugging an asp.net project in VS2010 professional

    For me, the solution was to Tools>Options>Debugging>Symbols. Then check the radiobutton 'All modules, unless exluded'. Then ' specify excluded modules' and add one line containing *.*

    After restarting VS, the problem disappeared.

    Monday, September 10, 2012 7:41 AM
  • Thanks - this one worked a treat
    Wednesday, October 31, 2012 4:30 PM
  • I have found out the solution for slow symbol loading when debugging Unit Tests using the NUnit Test Adapter (Beta 5). (VS 2012)
    I have seen that it always tries to load symbols for microsoft.visualstudio.testtools from f:\<cant remember path>
    It did not use the Microsoft Symbol Server although set in VS.
    After trying out all tips from the internet I changed the drive letter for my CD/DVD drive from F: to something else! Then all the symbols were downloaded from the MS Symbol Server into my specified directory. Starting debugging was as fast as expected.

    When changing back the drive letter to F: it still loads fast. Even when I delete the downloaded symbol files and disable the Symbol server. Cannot reproduce the behaviour. It solved my problem.

    Hope this helps someone else.


    • Edited by Hu Ha Friday, June 21, 2013 9:14 AM added more details
    Friday, June 21, 2013 9:12 AM
  • Clearing breakpoints sorted out the mess VS2012 had go itself into somehow. Loading symbols on a silverlight project was taking close to 5 minutes, when normally it was closer to 20 secs

    Thursday, August 01, 2013 12:17 PM