简体   繁体   中英

Visual Studio 2010 slow to debug, lots of ascx controls, loading symbols I don't need?

I have a webforms ASP.NET application with lots of user controls (*.ascx). When I start with debugging, it appears to reload symbols for each control, each of which takes a second or two; as a result the app takes about a minute and a half to start any time the code changes. (I can subsequently stop and start debugging very quickly as long as there are no code changes.)

In the output window, I have dozens of lines like these:

'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\Users\Herb Caudill\AppData\Local\Temp\Temporary ASP.NET Files\root\1f256061\12a5d99\App_Web_hcj5xynv.dll', Symbols loaded.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\Users\Herb Caudill\AppData\Local\Temp\Temporary ASP.NET Files\root\1f256061\12a5d99\App_Web_facettextboxfilter.ascx.b3b3f5d8.obkscoie.dll', Symbols loaded.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\Users\Herb Caudill\AppData\Local\Temp\Temporary ASP.NET Files\root\1f256061\12a5d99\App_Web_editgridcolumnchooser.ascx.b3b3f5d8.o1vmswte.dll', Symbols loaded.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\Users\Herb Caudill\AppData\Local\Temp\Temporary ASP.NET Files\root\1f256061\12a5d99\App_Web_editgridimporttools.ascx.b3b3f5d8.mslzoqjj.dll', Symbols loaded.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\Users\Herb Caudill\AppData\Local\Temp\Temporary ASP.NET Files\root\1f256061\12a5d99\App_Web_facetsearchpager.ascx.b3b3f5d8.b-mkmweb.dll', Symbols loaded.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\Users\Herb Caudill\AppData\Local\Temp\Temporary ASP.NET Files\root\1f256061\12a5d99\App_Web_photogallery.ascx.b3b3f5d8.0mzg-l3y.dll', Symbols loaded.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\Users\Herb Caudill\AppData\Local\Temp\Temporary ASP.NET Files\root\1f256061\12a5d99\App_Web_facetcheckboxfilter.ascx.b3b3f5d8.krw3yihh.dll', Symbols loaded.

Almost none of these controls have anything to do with the page I'm debugging. Is there any way to speed up the debug process by not loading all these symbols I don't need?

Note: There are many similar questions that are answered with "delete all breakpoints" and/or issues to do with loading Microsoft symbols over the network. Neither one of those is the issue here.

At first I think that your issue that load many dll is maybe because you do not have turn off the compiler batch, so on each change the visual studio make more than one page compile.

So I suggest to try this answer https://stackoverflow.com/a/9199027/159270 and its worked.

So set the optimizeCompilations to true, and batch to false

<compilation batch="false" optimizeCompilations="true" ... >

For asp.net version 3.5 must use this patch in order to work with this optimize switch. http://support.microsoft.com/kb/961884

Do not make the same thing on the online server.

There is an accepted answer for this on the msdn forums - original link here

http://social.msdn.microsoft.com/Forums/pl-PL/vsdebug/thread/a76c4fbe-93de-4875-b111-43a472876271

The answer below is cut and paste from there for convenience.

In Visual Studio you may influence symbol load-behaviour through "Modules Window" (accessible, when during debugging in break-mode through 'Debug->Windows->Modules), setting "Automatic Symbol Load Settings" to "Always Load Manually".

How to: Use the Modules Window http://msdn.microsoft.com/en-us/library/4c8f14c9.aspx

Also you may use "Symbols Settings" dialog, where you can specify, which symbols to load automatically How to: Specify Symbol Locations and Loading Behavior http://msdn.microsoft.com/en-us/library/x54fht41.aspx

Symbols, Debugging, Options Dialog Box http://msdn.microsoft.com/en-us/library/b13s79c0.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM