Reduce the time of attachment and loading of characters

Generally speaking, what are your recommendations on this? It currently takes about 10 minutes to connect to a locally executed IIS process with SharePoint 2007.

+7
visual-studio pdb debug-symbols visual-studio-debugging
source share
3 answers

Make sure your symbol path contains a local cache directory so that it does not download characters from the Microsoft public symbol server each time it connects.

Also, I have not tried this with Visual Studio, but you can also set an exception list that defines modules for which you have no characters.

+5
source share

In Visual Studio 2010, I almost instantly reduced the time it took to join the w3wp process by choosing Tools → Options → Debugging → Symbols, selecting Only the specified modules and clicking OK. This forces Visual Studio to load symbols for the six assemblies our team wrote, and skips the loading symbols for the remaining 146 modules in the process.

Note. I have Microsoft Symbol Servers verified for the locations of my Symbol file (.pdb) and I have character caching for c: \ debugSymbols.

+4
source share

You can also download symbols for your current platform from the debugging tools for the Windows page . Install them in a local directory of cached characters (for example, c: \ windows \ symbols)

You can also turn off automatic character loading, as described here .

Or something that might be faster, try running it outside the debugger (using Ctrl-F5), and then attach it to the process. I have a Visual Studio macro that I attach to Ctrl-Shift-A, which I hit to join my process at any time, and it is mapped to this:

Function AttachToProcess(ByVal procname As String, ByVal quiet As Boolean) As Boolean Dim attached As Boolean = False Dim proc2 As EnvDTE80.Process2 ' Attaching natively, from http://blogs.msdn.com/jimgries/archive/2005/11/30/498264.aspx' Dim dbg2 As EnvDTE80.Debugger2 = DTE.Debugger Dim trans As EnvDTE80.Transport = dbg2.Transports.Item("Default") Dim dbgeng(1) As EnvDTE80.Engine dbgeng(0) = trans.Engines.Item("Native") For Each proc2 In DTE.Debugger.LocalProcesses If (proc2.Name.Contains(procname)) Then proc2.Attach2(dbgeng) attached = True Exit For End If Next If (attached = False And quiet = False) Then MsgBox(procname + " is not running") End If Return attached End Function Sub AttachToMyProcess() AttachToProcess("MyProcess.exe", True) End Sub 
+1
source share

All Articles