<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">rajra's WebLog</title><subtitle type="html" /><id>http://blogs.msdn.com/b/rajra/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/rajra/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/rajra/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2004-08-03T14:23:00Z</updated><entry><title>Improving debugger stepping performance in Visual Studio 2005</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/rajra/archive/2005/08/31/458718.aspx" /><id>http://blogs.msdn.com/b/rajra/archive/2005/08/31/458718.aspx</id><published>2005-09-01T00:56:00Z</published><updated>2005-09-01T00:56:00Z</updated><content type="html">&lt;P&gt;Stepping in Visual Studio 2005 is affected by numerous factors.&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;1. Debugger windows you have open&amp;nbsp;&amp;nbsp;e.g. the callstack window requires us to walk the stacks every time you complete a step, Auto/Locals and watch window require us to evaluate all expressions in those windows &amp;nbsp;after you complete the step. &lt;/P&gt;
&lt;P&gt;2. Visualizers /Autoexpanders provided by the engines &lt;/P&gt;
&lt;UL dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.google.com/search?sourceid=navclient&amp;amp;ie=UTF-8&amp;amp;rls=GGLD,GGLD:2003-33,GGLD:en&amp;amp;q=autoexp%2Edat"&gt;Autoexp.dat &lt;/A&gt;for native&amp;nbsp;code. 
&lt;UL&gt;
&lt;LI&gt;Visual 2005 improves on autoexp.dat but adding support for STL types and also doing an "auto" expand on existing types. Some of the STL displays can be expensive (more on this later)&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;&amp;nbsp;&lt;A href="http://msdn.microsoft.com/msdnmag/issues/04/05/VisualStudio2005Debugging/default.aspx"&gt;Debugger display attributes &lt;/A&gt;for managed code. 
&lt;UL&gt;
&lt;LI&gt;Debugger displays can translate to execution&amp;nbsp;of a &amp;nbsp;function in the debuggee context,&amp;nbsp; this is inherently very expensive for the debugger because the callstacks have to be refreshed once the function call is executed (more on this later)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P dir=ltr&gt;3. Interop debugging, stepping and callstack walking is more involved.&lt;/P&gt;
&lt;P&gt;4. Remote debugging, requests have to be made on the remote box where debug-gee resides.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;We worked very hard on &lt;a href="http://blogs.msdn.com/jmstall/archive/2005/06/20/Interop_Stepping_Perf.aspx"&gt;improving the stepping performance &lt;/A&gt;in Visual Studio 2005. However, its very likely that there are users scenarios we missed. &lt;/P&gt;
&lt;P&gt;There are things that can improve stepping performance if this turns out to be an issue for you.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Close the Auto and Locals Window 
&lt;LI&gt;Right click on the callstack window and turn off display of Parameter Types, Parameter Values and Parameter Names (these can actually be key off item #2 ) 
&lt;LI&gt;Close the callstack window (note that even with the callstack window closed,&amp;nbsp;the debugger will request some callstack frames from the engine)&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=458718" width="1" height="1"&gt;</content><author><name>rajra</name><uri>http://blogs.msdn.com/rajra/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>RPC Debugging - Do you use it?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/rajra/archive/2004/08/03/207333.aspx" /><id>http://blogs.msdn.com/b/rajra/archive/2004/08/03/207333.aspx</id><published>2004-08-03T21:23:00Z</published><updated>2004-08-03T21:23:00Z</updated><content type="html">&lt;P&gt;The Visual Studio&amp;nbsp; C++ Debugger since VC6.0 have had this feature called RPC debugging. It was turned off by default and is present somewhere in Tools | Options [|Debugger]&lt;/P&gt;
&lt;P&gt;What does it do? Well, COM has provided hooks for debuggers that enable them to step into and out of COM calls that go across threads when the apartment rules require it (e.g STA calling into a MTA component). &lt;/P&gt;
&lt;P&gt;With RPC debugging turned on, when you do a step in at such a call site, you will automatically land at the&amp;nbsp;callee on a different thread (assuming the COM rules necessitated a cross thread marshaled call), you can also step back out of the callee and back into the caller.&lt;/P&gt;
&lt;P&gt;Caveats:&lt;/P&gt;
&lt;P&gt;1. You have to be an administrator for this to work. COM requires this.&lt;/P&gt;
&lt;P&gt;2. If you have a proxy&amp;nbsp; DLL then we require that it's&amp;nbsp;compiled with source level debugging information off (or compile with no debug info), This is because if you do have source and step in, we assume you want to stop in the proxy code since it has source line information.&lt;/P&gt;
&lt;P&gt;3. AFAIK, windbg does not support this.&lt;/P&gt;
&lt;P&gt;In Whidbey we extended this feature to support some mixed debugging debugging scenarios, meaning you can do cross thread stepping from a managed to native call site across different threads and vice versa.&lt;/P&gt;
&lt;P&gt;This posting is provided "AS IS" with no warranties, and confers no rights. &lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=207333" width="1" height="1"&gt;</content><author><name>rajra</name><uri>http://blogs.msdn.com/rajra/ProfileUrlRedirect.ashx</uri></author></entry></feed>