问题
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?
回答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.
回答2:
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%!
回答3:
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).
回答4:
Try any of the following ...
Enable Just My Code
Go to Tools > Options > Debugging > General
Check "Enable Just my Code"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 cacheRemove 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.
Further Reading
Stack Overflow
- Visual Studio debugging/loading very slow
- Visual Studio Build Very Slow
- Slow startup with IIS Express
- Website takes a long time to start after solution build
MS Docs
- Visual Studio debugger documentation
- Debug only user code with Just My Code
- Specify symbol (.pdb) and source files in the Visual Studio debugger
- Debugger Settings and Preparation
回答5:
Have you tried bypassing IIS express and running the application from your local IIS server? The url would look something like this: localhost/{yourprojectname}. You might still have a slow load the first time you hit the application, but after that it should stay pretty snappy because Visual Studio won't be starting the app every time you want to run it. Running the application from your local IIS also allows you to keep Firefox open when you start the debugger instead of opening and closing IE every time.
回答6:
Go to Tools>Options>Environment>Add In Security Uncheck "allow add in components to load" Restart Visual Studio
回答7:
I had the same slow-loading issue, but it was plaguing only one sandbox solution. Very similar staging and production/copy solutions were working just fine. So all these environmental tweaks folks were recommending couldn't explain it (I tried them anyway, of course.) Then I compared the .csproj files and found a suspicious looking difference. After correcting that, things got back to normal.
回答8:
I tried all solutions and nothing seemed to work. I cracked open my symbol settings TOOLS > Options > Debugging > Symbols and found the Cache Symbols in this directory
set to another user's directory e.g. C:\Users\<not my name>\AppData\Local\Temp\SymbolCache
I then cleared the setting string by making it empty, and removed any other pdb locations configured. Then press OK.
Then I kicked off a build and allowed VS to resolve those symbols (20 sec). I then stopped and restarted, and launched without loading symbols.
I'm assuming somewhere down the line I imported settings from another user.
回答9:
My VS2013 was painfully slow when debugging due to slow loading symbols. I noticed, during the slow loading, my network usage was very high though my app does not access it.
As an experiment, I unplugged my Ethernet cable and debugging was very fast. My symbols DownstreamStore was located at C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\DownstreamStore. Under Tools\Debugging\Symbols, I cleared the cache and when I attempted to exit, I received a message that it required administrator privileges to continue.
It may have been the permissions (that have probably changed since 2013) that was causing the symbols to be loaded from the Internet. I changed the directory to another, nonadministrative location on my flash drive and debugged. It was very slow the first time, but thereafter, it is was very fast.
来源:https://stackoverflow.com/questions/17660368/visual-studio-debugging-painfully-slow-when-loading-symbols