<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Bug Babble</title><link>http://blogs.msdn.com/stevejs/default.aspx</link><description>Bugs, debuggers, stuff</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Simple VS Addin (updated)</title><link>http://blogs.msdn.com/stevejs/archive/2005/12/21/506477.aspx</link><pubDate>Wed, 21 Dec 2005 22:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:506477</guid><dc:creator>SteveJS</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/506477.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=506477</wfw:commentRss><description>&lt;DIV class=Section1&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;Back during the PDC for Whidbey&amp;nbsp;I wrote a post about &lt;a href="http://blogs.msdn.com/stevejs/archive/2004/01/22/61901.aspx"&gt;Creating a Simple Addin&lt;/A&gt;.&amp;nbsp; Recently I was looking to update it and found a horrible bug in it.&amp;nbsp; First, here is the corrected code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=Section1&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=Section1&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; OnConnection(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; application, &lt;SPAN style="COLOR: teal"&gt;ext_ConnectMode&lt;/SPAN&gt; connectMode, &lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; addInInst, &lt;SPAN style="COLOR: blue"&gt;ref&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;Array&lt;/SPAN&gt; custom)&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;_applicationObject = (&lt;SPAN style="COLOR: teal"&gt;DTE2&lt;/SPAN&gt;)application;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _addInInstance = (&lt;SPAN style="COLOR: teal"&gt;AddIn&lt;/SPAN&gt;)addInInst;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _debuggerEvents = _applicationObject.Events.DebuggerEvents;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _debuggerEvents.OnEnterBreakMode += &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;_dispDebuggerEvents_OnEnterBreakModeEventHandler&lt;/SPAN&gt;(DebuggerEvents_OnEnterBreakMode);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=Section1&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;DebuggerEvents&lt;/SPAN&gt; _debuggerEvents;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; System.Collections.Generic.&lt;SPAN style="COLOR: teal"&gt;Queue&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: teal"&gt;EditPoint&lt;/SPAN&gt;&amp;gt; epQ = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; System.Collections.Generic.&lt;SPAN style="COLOR: teal"&gt;Queue&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: teal"&gt;EditPoint&lt;/SPAN&gt;&amp;gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; DebuggerEvents_OnEnterBreakMode(&lt;SPAN style="COLOR: teal"&gt;dbgEventReason&lt;/SPAN&gt; Reason, &lt;SPAN style="COLOR: blue"&gt;ref&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;dbgExecutionAction&lt;/SPAN&gt; ExecutionAction)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;TextDocument&lt;/SPAN&gt; td = (&lt;SPAN style="COLOR: teal"&gt;TextDocument&lt;/SPAN&gt;) _applicationObject.ActiveDocument.Object(&lt;SPAN style="COLOR: maroon"&gt;"TextDocument"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;EditPoint&lt;/SPAN&gt; ep = td.Selection.ActivePoint.CreateEditPoint();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;ep.SetBookmark();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;epQ.Enqueue(ep);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;if&lt;/SPAN&gt; (epQ.Count &amp;gt; 5)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; epQ.Dequeue().ClearBookmark();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;}&lt;/SPAN&gt;&lt;BR&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;I've changed a couple of things.&amp;nbsp;&amp;nbsp;I now create the Editpoint first and use it to set the bookmark rather than setting the bookmark on the selection then creating an editpoint.&amp;nbsp; This removes that&amp;nbsp;possibility&amp;nbsp;that I&amp;nbsp;save a&amp;nbsp;different place then where&amp;nbsp;I set the bookmark.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;The&amp;nbsp;more important issue is I keep a member variable for _applicationObject.Events.DebuggerEvents.&amp;nbsp; Why?&amp;nbsp; Because it keeps&amp;nbsp;that&amp;nbsp;event provider&amp;nbsp;from getting garbage collected.&amp;nbsp; I had made the assumption that the lifetime of _applicationObject.Events.DebuggerEvents would be strictly tied to the DTE object, and managed by automation.&amp;nbsp; That is not the case.&amp;nbsp; The way this bug manifests is pretty ugly since the Addin works as expected for a while,&amp;nbsp;until the Event Provider (_applicationObject.Events.DebuggerEvents) is collected and Finalized, at which point the events just stop coming.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;I wasn't sure if this was by design or not.&amp;nbsp; However,&amp;nbsp;I found this KB article: &lt;A href="http://support.microsoft.com/default.aspx?scid=kb;en-us;555430"&gt;Visual Studio .Net events being disconnected from add-in&lt;/A&gt;,&amp;nbsp;so I am going with it being&amp;nbsp;by design.&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=506477" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Bugs/default.aspx">Bugs</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Babble/default.aspx">Babble</category></item><item><title>Naming threads in Win32 And .Net</title><link>http://blogs.msdn.com/stevejs/archive/2005/12/19/505815.aspx</link><pubDate>Tue, 20 Dec 2005 08:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:505815</guid><dc:creator>SteveJS</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/505815.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=505815</wfw:commentRss><description>&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;When you are debugging an application with multiple threads it can be handy to have a better name than just the thread id.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This is simple to do in managed code.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;There is a property on the Thread object that you can set.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It is also possible to do this for native code. However, there is simply no way you will ever discover it unless someone points you to&amp;nbsp;the difficult to find docs.&amp;nbsp; I knew about&amp;nbsp;the feature&amp;nbsp;and still missed&amp;nbsp;the docs&amp;nbsp;the first time I looked for them!&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;For completness, here is the managed version: &lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/vsdebug/html/vxconSettingThreadNameManaged.asp?frame=true"&gt;Setting a Thread Name (Managed)&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in; mso-outline-level: 1"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;The more interesting one is the native version: &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtsksettingthreadname.asp"&gt;Setting a Thread Name (Unmanaged)&lt;/A&gt;&amp;nbsp;(There is a typo in the documentation's code; 'except' should be '__except'. I've included a corrected copy below.)&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;The native&amp;nbsp;method of setting the thread name&amp;nbsp;is&amp;nbsp;implemented by raising an SEH exception that is continued.&amp;nbsp; If you go to the docs on RaiseException you'll see&amp;nbsp;part of the reason for this strange mechanism.&amp;nbsp; An attached native debugger will get a 'first chance' notification of the exception.&amp;nbsp; Raising an exception is precisely what you need to do to get the native debugger's attention.&amp;nbsp;The one raised here (0x406D1388) is recognized by VS (and WinDbg).&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Note: If anything in your process installs a vectored exception handler, that handler will not&amp;nbsp;be called on this exception code&amp;nbsp;when the&amp;nbsp;VS debugger is attached.&amp;nbsp; The VS debugger always&amp;nbsp;handles this exception code and continues execution,&amp;nbsp;preventing any further handlers.&amp;nbsp;&amp;nbsp;In WinDbg you can go to Debug/Event Filters and set the "Visual C++&amp;nbsp;exception" to be disabled.&amp;nbsp;&amp;nbsp;With that setting,&amp;nbsp;your vectored exception handler will get a shot at 0x406D1388 while WinDbg is debugging it.&lt;/P&gt;&lt;PRE class=code&gt;//
// Usage: SetThreadName (-1, "MainThread");
//
typedef struct tagTHREADNAME_INFO
{
   DWORD dwType; // must be 0x1000
   LPCSTR szName; // pointer to name (in user addr space)
   DWORD dwThreadID; // thread ID (-1=caller thread)
   DWORD dwFlags; // reserved for future use, must be zero
} THREADNAME_INFO;

void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName)
{
   THREADNAME_INFO info;
   info.dwType = 0x1000;
   info.szName = szThreadName;
   info.dwThreadID = dwThreadID;
   info.dwFlags = 0;

   __try
   {
      RaiseException( 0x406D1388, 0, sizeof(info)/sizeof(DWORD), (DWORD*)&amp;amp;info );
   }
   __except(EXCEPTION_CONTINUE_EXECUTION)
   {
   }
}&lt;/PRE&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=505815" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Bugs/default.aspx">Bugs</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Babble/default.aspx">Babble</category></item><item><title>FuncEvil, the Clipboard, and Deadlocks</title><link>http://blogs.msdn.com/stevejs/archive/2005/12/08/501939.aspx</link><pubDate>Fri, 09 Dec 2005 10:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:501939</guid><dc:creator>SteveJS</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/501939.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=501939</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;Mike Stall has a great post that, for a debugger dev, is the moral equivalent of sticking a fork in a toaster.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The basic problem he addresses is that once you are stopped in the debugger the UI for your application will no longer paint.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;What if you need to see something on that UI? &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;If you like to live on the edge, Mike’s &lt;a href="http://blogs.msdn.com/jmstall/archive/2005/12/07/funceval_message_pump.aspx"&gt;Evil trick to render UI when stopped at a breakpoint&lt;/A&gt; is the answer for you.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Unfortunately, you need to be stopped on the UI thread for it to work.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Pumping messages on another thread will not unblock the UI to paint.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Even more unfortunate is that switching threads in the debugger won’t help.&amp;nbsp;&amp;nbsp;Function evaluation when debugging managed code requires you to be at a reasonable point on the thread. It is very unlikely you will randomly be at such a point, unless you stopped on the thread in question.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You can see the result I got when I stop on another thread, then switched to the UI thread:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;?System.Windows.Forms.MessageBox.Show("pump")&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible, possibly because the code is optimized.”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Now don’t let this dissuade you from how useful this very, very, very dangerous trick can be.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Sometimes playing with fire is useful.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Not rendering the UI is only one problem that can happen due to the debugger stopping a process. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;A really bad problem that lack of message pumping can cause is clipboard deadlock. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;The real problem is&amp;nbsp;&lt;/SPAN&gt;due to delayed rendering, which requires the app that copied to the clipboard to be live.&amp;nbsp; You can read about delayed rendering&amp;nbsp;on the MSDN &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/clipboard/clipboardoperations.asp"&gt;Clipboard Operations&lt;/A&gt; page.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The basic problem is that the application you are debugging owns the clipboard, and other apps need it to respond to messages to get the contents of the clipboard. You can see this by creating a trivial winform app with a button and a RichTextbox:&lt;/P&gt;
&lt;P&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/71710810/"&gt;&lt;IMG height=301 alt=TrivialWinForm src="http://static.flickr.com/35/71710810_c1a4882f5b_o.png" width=304&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;(Note you need to use a RichTextBox here … a normal TextBox will actually copy the contents to the clipboard rather than using delayed rendering.)&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;First set a breakpoint in the button handler.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Then select the “Copy me at your own Risk!” text and copy it to the clipboard with Ctrl-C.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Now hit the button.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Nothing is wrong yet.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;However if you go to any application and hit paste that application is now hung, and will remain so until you continue from the breakpoint.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If you hit paste in the debugger you’ll deadlock that too without any way to continue from the bp.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Clipboard deadlock&amp;nbsp;has hit me few a times composing mail while stopped at a breakpoint.&amp;nbsp;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;Using the trick that Mike outlines does free&amp;nbsp;the applications&amp;nbsp;waiting for your winform app to provide the clipboard data. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;If you do not understand why func eval is evil I must end by pointing you to Mike's older post &lt;a href="http://blogs.msdn.com/jmstall/archive/2005/03/23/400794.aspx"&gt;Func-eval is evil&lt;/A&gt;, and GreggM's more recent&amp;nbsp;post &lt;A id=_ctl0__ctl0__ctl0__ctl0_RecentPosts__ctl0_postlist__ctl0_EntryItems__ctl0_PostTitle href="/greggm/archive/2005/11/18/494648.aspx"&gt;&lt;FONT color=#006bad&gt;Func eval and System.Windows.Forms.Form&lt;/FONT&gt;&lt;/A&gt;.&amp;nbsp; Func Eval is powerful, and with great power comes a bunch of power to shoot yourself in the foot.&amp;nbsp; Be careful using func eval.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=501939" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Bugs/default.aspx">Bugs</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Babble/default.aspx">Babble</category></item><item><title>Change Debugger behavior with Attributes</title><link>http://blogs.msdn.com/stevejs/archive/2005/12/03/499803.aspx</link><pubDate>Sun, 04 Dec 2005 00:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:499803</guid><dc:creator>SteveJS</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/499803.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=499803</wfw:commentRss><description>&lt;DIV class=Section1&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;Certain metadata attributes modify the stepping, breakpoint, and callstack behavior of the VS managed Debugger.&amp;nbsp; This is useful if you are creating an interpreter, language runtime, or a tool that modifies the code in a managed assembly.&amp;nbsp; There are three flavors of these attributes that affect execution control.&amp;nbsp; Each behaves slightly differently, and I always forget which does what, so I'm recording it here for my own reference as well.&amp;nbsp;&lt;/SPAN&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;/SPAN&gt;&amp;nbsp;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;The code below shows examples using all three attributes: DebuggerStepThrough, DebuggerHidden, and DebuggerNonUserCode.&amp;nbsp; The example also shows the hidden line directive.&amp;nbsp;&amp;nbsp;I've inlined the explanation as comments in the code so it can travel with the example.&amp;nbsp;&amp;nbsp;This general area of writing tools that interact with the debugger has been well explored on Mike Stall's blog:&lt;/SPAN&gt;&lt;BR&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;/SPAN&gt;&amp;nbsp;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;a href="http://blogs.msdn.com/jmstall/archive/2005/06/19/FeeFee_SequencePoints.aspx"&gt;#line hidden and 0xFeeFee sequence points&lt;/A&gt;&lt;/SPAN&gt;&lt;BR&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;a href="http://blogs.msdn.com/jmstall/archive/2004/12/31/344832.aspx"&gt;How can I debug Just My Code?&lt;/A&gt;&lt;/SPAN&gt;&lt;BR&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;a href="http://blogs.msdn.com/jmstall/archive/2005/07/27/state_machine_theory.aspx"&gt;Debug support for arbitrary state-machines&lt;/A&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; System;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// This example shows the use of the three debugger attributes&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// that modify the runtime behavior of the VS debugger.&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// The motivating example is part of an AOP (Aspect Oriented Programming)&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// implemenatation.&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// The concepts around AOP are pretty interesting, but for this&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// example it is sufficient to know that anything called a 'Thunk'&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// is something added by the tool that is of no interest to the user.&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// The example code is what a weaver that uses C# as a backend could &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// send to the compiler to accomplish the hiding of &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// JoinPointThunks, and the calls to those thunks.&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// Try stepping through this with this option on:&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// Tools/Options/Debugging/General/Enable Just My Code&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// Then try the same with the option off.&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// You'll see that each attribute creates a slightly different end user&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// behavior and slightly different ease of debugging for yourself&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// when you need to debug the glue code you are hiding from the user.&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;class&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: teal"&gt;DynamicallyAddedUserCode&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;{&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; bar()&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"Hello advice\n"&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;};&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;class&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: teal"&gt;Weaver&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;{&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [System.Diagnostics.&lt;SPAN style="COLOR: teal"&gt;DebuggerStepThrough&lt;/SPAN&gt;]&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; ExampleJoinPointThunk_withDebuggerStepThrough()&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//_________________________________________________________________&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Tools/Options/Debugging/Enable Just My Code ON:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//CALLSTACK view: Frame is viewable&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//BP: Will hit bp.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//STEPPING:&amp;nbsp; Will not stop inside due to a step.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// (Even from bp hit! Any step is a step out.)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Step in will land inside called methods.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//_________________________________________________________________&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Tools/Options/Debugging/Enable Just My Code OFF:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="COLOR: green"&gt;//CALLSTACK view: [External Code] frame.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//&amp;nbsp;&amp;nbsp; Real frame is viewable by selecting 'Show External Code'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//&amp;nbsp;&amp;nbsp; in Callstack window.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//BP: No bp will set or hit. A warning is provided, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//STEPPING: Will not stop inside method (step in or step out)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//&amp;nbsp; A step in will land in called methods.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//_________________________________________________________________&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;DynamicallyAddedUserCode&lt;/SPAN&gt;.bar();&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; thisGoesTo = 11;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [System.Diagnostics.&lt;SPAN style="COLOR: teal"&gt;DebuggerHidden&lt;/SPAN&gt;]&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; ExampleJoinPointThunk_withDebuggerHidden()&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//_________________________________________________________________&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Tools/Options/Debugging/Enable Just My Code ON:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//CALLSTACK view: Frame is completely hidden.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//BP: A Bp will set with no error, but will not hit!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//stepping: A Step in will land in called methods.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//_________________________________________________________________&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Tools/Options/Debugging/Enable Just My Code OFF:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//CALLSTACK view: Frame is completely hidden. (i.e. No [External Code])&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//BP:Warning provided, no bp will set or hit.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//STEPPING: Will not stop inside method (step in or step out)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//&amp;nbsp; A step in will land in called methods.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//_________________________________________________________________&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;DynamicallyAddedUserCode&lt;/SPAN&gt;.bar();&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; thisGoesTo = 11;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [System.Diagnostics.&lt;SPAN style="COLOR: teal"&gt;DebuggerNonUserCode&lt;/SPAN&gt;]&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; ExampleJointPointThunk_withDebuggerNonUserCode()&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//_________________________________________________________________&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// [Same as normal code.]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Tools/Options/Debugging/Enable Just My Code ON: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//CALLSTACK view: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;Normal&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt; view, callstack is viewable.&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//BP: A bp will set and hit.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//STEPPING: Step as normal.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//_________________________________________________________________&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// [Same as Debugger StepThrough]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Tools/Options/Debugging/Enable Just My Code OFF&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//CALLSTACK view:[ External Code] frame.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//&amp;nbsp;&amp;nbsp; Real frame is viewable by selecting 'Show External Code'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//&amp;nbsp;&amp;nbsp; in Callstack window.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//BP: Warning provided, no bp will set or hit.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//STEPPING:&amp;nbsp; Will not stop inside method (step in or step out)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//&amp;nbsp; A step in will land in called methods.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//_________________________________________________________________&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;DynamicallyAddedUserCode&lt;/SPAN&gt;.bar();&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; thisGoesTo = 11;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;};&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;class&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: teal"&gt;Program&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;{&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; foo()&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;#line&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; hidden&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//this emits a Sequence Point with line = 0xFeeFEE&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//Imagine these hidden areas were added dynamically&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Weaver&lt;/SPAN&gt;.ExampleJoinPointThunk_withDebuggerStepThrough();&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;#line&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; default&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; theone = 1;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;#line&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; hidden&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Weaver&lt;/SPAN&gt;.ExampleJoinPointThunk_withDebuggerHidden();&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;#line&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; default&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; volume = 11;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;#line&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; hidden&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Weaver&lt;/SPAN&gt;.ExampleJointPointThunk_withDebuggerNonUserCode();&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;#line&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; default&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; answer = 42;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;Main&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;[] args)&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foo();&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;}&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// The #line hidden directive places 0xFeeFee sequence point in the line &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// information. The 0xFeeFee sequence point tells the debugger to continue&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// stepping.&amp;nbsp; It is not necessary unless a step can end at the location.&amp;nbsp; &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// If you are writing a compiler and emitting your own debug information,&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// then it is often possible to simply omit the line info for code that would&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// be marked hidden. If you decompile the above code with ILDasm /Linenum you&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// will see an example of that strategy.&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// However there are cases where it is important to use the a hidden sequence&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// point. Any place where a branch instruction lands must use a hidden sequence&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// point if you do not want the debugger to stop there.&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;//&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// The motivating example for this is having all exit points from a Try block&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// branch to a single leave instruction.&amp;nbsp; If you produce that type of codegen&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// you will need to use 0xFeeFee to create reasonable stepping behavior.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P class=Section1 style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=499803" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Bugs/default.aspx">Bugs</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Babble/default.aspx">Babble</category></item><item><title>Netmodules: Sort of like a lib</title><link>http://blogs.msdn.com/stevejs/archive/2005/11/27/497333.aspx</link><pubDate>Mon, 28 Nov 2005 06:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:497333</guid><dc:creator>SteveJS</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/497333.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=497333</wfw:commentRss><description>&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;I first ran into netmodules before VS 2002 was shipped. The netmodule gave me precisely what I asked for, without actually solving my problem.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I wanted to use multiple languages (C#, and C++ /clr)&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;in a single assembly.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It turns out a single assembly can be multi-module.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; Multi-module means a single .Net assembly is spread across multiple win32 dlls. &amp;nbsp;&lt;/SPAN&gt;What I really wanted was a single module&amp;nbsp;assembly written in multiple languages. Netmodules couldn't solve my problem back then, but with the VS 2005&amp;nbsp;C++ linker&amp;nbsp;they can now.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Check out JuFeng's articles for some more in depth coverage, and an explanation why you might want a multi-module assembly:&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&lt;a href="http://blogs.msdn.com/junfeng/archive/2004/07/15/183813.aspx"&gt;MultiModule Assemblies&lt;/A&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0in; mso-outline-level: 1"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;a href="http://blogs.msdn.com/junfeng/archive/2005/02/12/371683.aspx"&gt;Netmodule vs. Assembly&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Since JuFeng's examples didn't show how to create debug info I thought I'd make an updated example here.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Here's a quick example with a multi-module assembly:&lt;/P&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/67750045/"&gt;&lt;IMG height=195 alt=a_source src="http://static.flickr.com/26/67750045_149369f8c9_o.png" width=273&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/67750046/"&gt;&lt;IMG height=105 alt=b_source src="http://static.flickr.com/34/67750046_ce07feeb38_o.png" width=238&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;From the Visual Studio&amp;nbsp; 2005 Command Prompt:&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;C:\blog\linkexample&amp;gt;vbc /target:module /debug+ b.vb&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;C:\blog\linkexample&amp;gt;csc /debug+ /addmodule:b.netmodule a.cs&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;C:\blog\linkexample&amp;gt;devenv /debugexe a.exe&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Check out the modules window:&lt;/P&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/67750048/"&gt;&lt;IMG height=74 alt=multi_module src="http://static.flickr.com/26/67750048_6436579988_o.png" width=709&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;And the callstack window:&lt;/P&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/67755934/"&gt;&lt;IMG height=88 alt=multi2_callstack src="http://static.flickr.com/29/67755934_08261ecb38_o.png" width=294&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;To get a single file assembly I'll need to recompile the cs file into a netmodule then use the c++ linker.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;C:\blog\linkexample&amp;gt;csc /addmodule:b.netmodule /target:module /debug+ a.cs&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;C:\blog\linkexample&amp;gt;link /entry:fooCS.Main /out:theone.exe /subsystem:console /debug a.netmodule b.netmodule&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;C:\blog\linkexample&amp;gt;devenv /debugexe theone.exe&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Now check out the modules window:&lt;/P&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/67750050/"&gt;&lt;IMG height=54 alt=single_module src="http://static.flickr.com/34/67750050_5b72c149be_o.png" width=730&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;And the callstack window:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/67755935/"&gt;&lt;IMG height=79 alt=single2_callstack src="http://static.flickr.com/32/67755935_9777ee3976_o.png" width=321&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=497333" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Bugs/default.aspx">Bugs</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Babble/default.aspx">Babble</category></item><item><title>XSLT debugging in Visual Studio</title><link>http://blogs.msdn.com/stevejs/archive/2005/11/16/493805.aspx</link><pubDate>Thu, 17 Nov 2005 10:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:493805</guid><dc:creator>SteveJS</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/493805.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=493805</wfw:commentRss><description>&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Visual Studio is a big tool.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It's easy to miss some useful features.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; Hopefully t&lt;/SPAN&gt;he XSLT debugger won't get missed.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;If you want to learn how to use XSLT debugging take a look at Neetu Rajpal's msdn article &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/xmltools.asp"&gt;Introducing Xml tools in VS 2005&lt;/A&gt;.&amp;nbsp; Below you can see the debugger in action as an xslt transform is being applied to some XML. &lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;(Please excuse the nonsense XSLT I use in the example.&amp;nbsp; I haven't had a chance to play around with XSLT for quite some time.)&lt;/P&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/64132295/"&gt;&lt;IMG height=179 alt=XSLTdebugging src="http://static.flickr.com/33/64132295_840be0980d_o.png" width=652&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;XSLT debugging is interesting to me because much of it is the managed debugger.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;XSLT is compiled to msil, and the managed debugger is used to provide things like breakpoints and stepping.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;You can see this by opening the modules window.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You'll see in the last column that the process is a managed process called the Microsoft.XSLDebugProxy.exe, and there will be some modules loaded with names like System.Xml.Xsl.CompiledQuery.1.&amp;nbsp;&amp;nbsp;&amp;nbsp;All of the debugger windows work as expected: callstack, locals, immediate, threads, modules.&amp;nbsp; You can see below the callstack for my nonsense example:&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/64135280/"&gt;&lt;IMG height=100 alt=XSLTcallstackwithJMC src="http://static.flickr.com/30/64135280_a911535011_o.png" width=476&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;However! Go to the callstack window and right click to get the context menu.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;There will be an item called Show External Code.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Pick that and you get to see much in the callstack window that was hidden before.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The grey colored frames are&amp;nbsp;because there is no debug info (pdb file) for that assembly, which is why those frames were marked as 'External Code' before.&amp;nbsp; The CompiledQuery frames were hidden because the XSLT compiler placed an attribute on them to tell the debugger they were not of interest.&amp;nbsp;&amp;nbsp; With the expanded view&amp;nbsp;you can now&amp;nbsp;see the compiled query and the code that dispatched it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/64135279/"&gt;&lt;IMG height=457 alt=XSLTCallstackWithoutJMC src="http://static.flickr.com/29/64135279_3386e1de8d_o.png" width=467&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;However, while that is interesting it is unlikely to help you get at a bug in your XSLT.&amp;nbsp; The Locals window however appears to be one of the more useful windows, that can help you see what is happening as the transforms are applied.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/64137060/"&gt;&lt;IMG height=126 alt=LocalsWindowXSLTdebugging src="http://static.flickr.com/35/64137060_f5844b842a_o.png" width=520&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=493805" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Bugs/default.aspx">Bugs</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>Edit and Continue on 64 bit Windows</title><link>http://blogs.msdn.com/stevejs/archive/2005/11/15/493018.aspx</link><pubDate>Tue, 15 Nov 2005 21:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:493018</guid><dc:creator>SteveJS</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/493018.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=493018</wfw:commentRss><description>&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&lt;A href="http://bloggingabout.net/blogs/pascal/archive/2005/10/20/9913.aspx"&gt;Pascal&amp;nbsp;writes&lt;/A&gt; about the joy of x64 Windows XP, and some drawbacks.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;One drawback is no Edit and Continue using the 64 bit CLR.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You can, however, use E&amp;amp;C against the 32 bit CLR on a x64 machine.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Here's how you do it:&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;You need to compile your managed assembly with a target CPU of x86.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This will cause the 32 bit CLR to be used rather than the 64 bit CLR.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;For a VB Project, right click on the project and go to Properties/Compile/Advanced Compile Options/Target CPU and set it to "x86".&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;For a C# Project, right click on the project and go to Properites/Build/Platform Target and set it to "x86".&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;If you want to (or must) use the 64 bit CLR, we unfortunately cannot provide E&amp;amp;C.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; In C# if you try to edit t&lt;/SPAN&gt;here is a dialog that tells you edits are not allowed .&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; To prevent the dialog, &lt;/SPAN&gt;disable E&amp;amp;C: Tools/Options/Debugging/Edit and Continue, and uncheck 'Enable Edit and Continue'.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=493018" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>Make DataTips Transparent</title><link>http://blogs.msdn.com/stevejs/archive/2005/11/12/492115.aspx</link><pubDate>Sat, 12 Nov 2005 20:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:492115</guid><dc:creator>SteveJS</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/492115.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=492115</wfw:commentRss><description>&lt;P&gt;Enhanced datatips are my favorite new debugger feature. However, sometimes you want to see underneath&amp;nbsp;the tip&amp;nbsp;without losing your spot. Fortunately, &lt;a href="http://blogs.msdn.com/jimgries/"&gt;JimGries&lt;/A&gt; thought of that. You can make the DataTip transparent by pressing the ctrl key or middle mouse button. &lt;/P&gt;
&lt;P&gt;Here is an Enhanced DataTip In Visual Studio 2005: &lt;/P&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/62471145/"&gt;&lt;IMG height=294 alt=EnahncedToolTip src="http://static.flickr.com/27/62471145_37486a515b_o.png" width=456&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Here is the same DataTip with the Crtl key pressed:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/62471147/"&gt;&lt;IMG height=293 alt=EnhancedToolTipWithCtrlPressed src="http://static.flickr.com/31/62471147_152baf2f99_o.png" width=453&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Update: JimGries pointed out that you can also make the DataTip transparent by pressing the middle mouse button (or wheel).&amp;nbsp; If you have the wheel (and who doesn't today) you can also scroll with it, just as you'd expect.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=492115" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>Post Mortems</title><link>http://blogs.msdn.com/stevejs/archive/2005/11/10/491389.aspx</link><pubDate>Thu, 10 Nov 2005 20:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:491389</guid><dc:creator>SteveJS</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/491389.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=491389</wfw:commentRss><description>&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;I won the guess the murderer contest.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Shai and I compete to guess who the real murderer is on Law and Order Criminal Intent.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Last night we watched Sunday's two hour show.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It's a toss up who wins, but one of us always gets it by two thirds of the way through.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That's the point where the amount of time left means the current suspect can't be the real murderer, and typically there was only one other possible suspect.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The more unlikely the suspect, the higher our certainty.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That just makes for better TV.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;This mechanism of diagnosis is not very helpful for figuring out real world problems.&amp;nbsp; There is no way to use a Tivo to tell you everything will be resolved in the next 20 minutes.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It does however have something in common with Post Mortems.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;A Post Mortem is where the team shines the bright light of 20/20 hindsight on all the decisions that were hard.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This perspective is much like having the extra knowledge that everything&amp;nbsp;will be wrapped up in 20 minutes.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Things that were unknowns are now knowns.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Those tough calls that could have caused problems, yet no problems appeared: obviously good decisions.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Those tough calls that did cause problems: obviously we shouldn't do that again … duh!&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Unfortunately these fantastic insights are entirely informed via knowledge&amp;nbsp;not present at the time the decision was made.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I'm certainly not saying that Post mortems are useless!&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It's just that after you've categorized the bad decisions and the good decisions you still need to synthesize some useful advice that does not require precognition to use properly.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;On the other hand, making decisions based on what makes for good TV sounds like it could be fun.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=491389" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Babble/default.aspx">Babble</category></item><item><title>Perf Awareness is not Premature </title><link>http://blogs.msdn.com/stevejs/archive/2005/11/06/489644.aspx</link><pubDate>Mon, 07 Nov 2005 02:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:489644</guid><dc:creator>SteveJS</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/489644.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=489644</wfw:commentRss><description>&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;I've&amp;nbsp;found myself adding a timer to each of the unit test frameworks I use so I can see how long my tests take.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I am not trying to do anything complex.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I just want to be aware of&amp;nbsp;the perf.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The same way pass and fail are visible, 1ms vs 90ms is visible. &lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Premature optimization rightly has a bad rep.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Creating&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;complex code where performance doesn't matter is a bad tradeoff.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;That's not what I'm doing here.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I&amp;nbsp;am not trying to code for perf.&amp;nbsp; I'm trying to be perf aware.&amp;nbsp; If&amp;nbsp;the test&amp;nbsp;is fast I'm certainly not going to use that as an excuse to&amp;nbsp;start changing code.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If it's slow, I know about it and I won't check in something that kills perf.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; Once you have a number, t&lt;/SPAN&gt;he real question is: How do you judge if it is&amp;nbsp;fast or slow?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; The answer is a perf budget.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Rico Mariani has a great &lt;a href="http://blogs.msdn.com/ricom/archive/2003/12/12/43245.aspx"&gt;Designing for Performance&lt;/A&gt;&amp;nbsp;post where he talks about&amp;nbsp;using Perf budgets.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;In the absence of a perf budget, spend your time getting a perf budget rather than mucking about with code.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Once you have perf budgets, being aware of resource consumption makes it easier to see problems earlier.&amp;nbsp; A perf problem is a bug.&amp;nbsp; Fixing a&amp;nbsp;bug before it gets into the source tree is always a good idea.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=489644" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Bugs/default.aspx">Bugs</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Babble/default.aspx">Babble</category></item><item><title>Checking the result of new is a bug in C++</title><link>http://blogs.msdn.com/stevejs/archive/2005/11/01/487776.aspx</link><pubDate>Tue, 01 Nov 2005 21:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:487776</guid><dc:creator>SteveJS</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/487776.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=487776</wfw:commentRss><description>&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;At least, it is a bug in VC8.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; That check won't happen. &amp;nbsp;&lt;/SPAN&gt;Reading Larry Osterman's recent posts&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;&lt;a href="http://blogs.msdn.com/larryosterman/archive/2005/10/28/486409.aspx"&gt;"What's wrong with this code, part 15"&lt;/A&gt; and the &lt;a href="http://blogs.msdn.com/larryosterman/archive/2005/10/31/487352.aspx"&gt;answers&lt;/A&gt;, reminded me this behavior changed in VC8.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If you check the result of new in code compiled with VC8, your code is wrong.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;The call to new will throw.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Yes,&amp;nbsp;your code&amp;nbsp;worked in 5.0,&amp;nbsp;6.0,&amp;nbsp;(maybe) 7.0 and&amp;nbsp;7.1, but&amp;nbsp;it doesn't now.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;You can get the old behavior if you&amp;nbsp;link with nothrownew.obj.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The linker will then make every call to new in your dll (or exe) non-throwing.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;This is incompatible with STL, or any other code that relies on new throwing.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;The only other option is to use&amp;nbsp;std::nothrow placement new.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Don't do that.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;If you are writing code that uses no throw semantics, you probably&amp;nbsp;need those same semantics from the libs you link as well.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;If you are linking a lib that was coded expecting new to return NULL rather than throw, the linker doesn't know that.&amp;nbsp;&amp;nbsp;In VC8 it&amp;nbsp;will&amp;nbsp;link the throwing version.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;Linking with&lt;/SPAN&gt; nothrownew.obj tells the linker that everything needs the old, non-standard version of new that returns NULL.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;What if you are using 2 libs?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;One that needs the non-standard new, and one that needs the standard new?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If that is the case, package one in it's own dll,&amp;nbsp;or&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;change it so you have consistency on the definition of new.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Don't bother trying to get the linker to do something magical.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It won't.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The linker makes a decision on what new means and that's it for the entire dll.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;History of new through the VC's:&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;In VC5.0, and VC6.0 you basically got nothrow new and had to jump through hoops to get a throwing version.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;MFC did use a throwing version, but it doesn't throw std::bad_alloc.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Also new(std::nothrow), had bugs which caused&amp;nbsp;it to throw in some circumstances.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;For users of non throwing new, life was good.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;For everyone else, not so much. See this msdn article &lt;A href="http://msdn.microsoft.com/msdnmag/issues/03/09/LegacySTLFix/default.aspx"&gt;"Don't Let Memory Allocation Failures crash your lagacy STL Application"&lt;/A&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;for the details.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;In 7.0 and 7.1 the VC++ team attempted to do something clever.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The version of new you get is controlled by the first significant header in the first obj linked.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This means a large number of examples do exactly what you'd expect.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It also means there are corner cases where it is almost impossible to understand what's happening.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; Y&lt;/SPAN&gt;ou could force&amp;nbsp;a standard complying&amp;nbsp;new by linking thrownew.obj.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;In 8.0 the VC++ team decided to clean up many standard compliance issues.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Now the C++ standard is used.&amp;nbsp; Full Stop.&amp;nbsp;&lt;SPAN style="mso-spacerun: yes"&gt; I&lt;/SPAN&gt;f you want the old behavior,&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;you must link nothrownew.obj.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Finally, I must thank Martyn Lovell for explaining the&amp;nbsp;background on this issue, and clarifying some of the details.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If there are any errors&amp;nbsp;here&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;they are&amp;nbsp;due to me&amp;nbsp;alone.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=487776" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Bugs/default.aspx">Bugs</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>Tabs vs Spaces</title><link>http://blogs.msdn.com/stevejs/archive/2005/10/30/487102.aspx</link><pubDate>Mon, 31 Oct 2005 03:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:487102</guid><dc:creator>SteveJS</dc:creator><slash:comments>15</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/487102.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=487102</wfw:commentRss><description>&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Of course, there is only one answer to whether tabs&amp;nbsp;should be&amp;nbsp;allowed in a source file.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The utility of one is just so obvious I'll simply avoid commenting on it.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;:-)&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;If&amp;nbsp;you must&amp;nbsp;wander from sources written with one convention to those written in another, you should definitely set Visual Studio (or whatever editor you use) to show whitespace as visible.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You can change this in VS by going to Edit/Advanced/View White Space. &lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;I also change the default color for visible whitespace to silver.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;Silver&lt;/SPAN&gt; on a white background&amp;nbsp;is unobtrusive, yet noticeable when there is inconsistency. &lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;(Next time, I'll go into whether Big Endian or Little Endian byte ordering is better. :-)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=487102" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/stevejs/archive/tags/Babble/default.aspx">Babble</category></item><item><title>Data Breakpoints</title><link>http://blogs.msdn.com/stevejs/archive/2005/10/27/485792.aspx</link><pubDate>Thu, 27 Oct 2005 22:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:485792</guid><dc:creator>SteveJS</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/485792.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=485792</wfw:commentRss><description>&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;The VS debugger allows two types of breakpoints. There are location breakpoints and data breakpoints.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Each has lots of bells and whistles.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;However, sometimes people confuse a Location bp with a condition, for a data bp.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That's unfortunate because a data bp solves a different problem.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;A data breakpoint involves telling the debugger to stop when the value at an address changes.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Use a data bp when you know some data is getting changed and you want to know where in the instruction stream that is happening.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;A location breakpoint with a condition triggers a stop when the instruction pointer reaches the proper address.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;After the stop we then evaluate the condition to determine if we should continue automatically or notify you that the breakpoint hit.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Use a condition when the underlying breakpoint gets hit too often and you want to constrain it to certain circumstances.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Data bps are implemented with a hardware register on the cpu.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In VS Whidbey, we allow Data bps for native code.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;We restrict the number of them to the number of available hardware registers that support data bps.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Though the hardware supports read based data bps, in VS we only implement stopping when the value is written.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Managed code does not have Data Bps.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Mike Stall has a blog topic &lt;a href="http://blogs.msdn.com/jmstall/archive/2005/10/12/feature_request_poll.aspx"&gt;asking for votes on potential feature requests&lt;/A&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Data breakpoints are on that list.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;In Whidbey, to set a data bp, open the breakpoint window (Debug/Windows/Breakpoints).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Hit the 'New' menu button, and pick 'New Data Breakpoint'.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The dialog has specific suggestions on what to enter.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I suggest entering it as a hex address.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Regardless of what you enter, the line in the Breakpoints window will show a hex address. Make sure it points to the data you are interested in.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If you try to create more than four data bps you will get a dialog saying the maximum number of data breakpoints have already been set.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;This UI metaphor is primitive compared to what we had in the past.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Why did it change to something that seems inferior?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In past versions you could enter an arbitrary expression.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;We would figure out what needed to be watched and stop when the value of that expression changed.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This is awesome except in the vast majority of cases where it would trigger something called 'Emulation'.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Someone using data bps would find it difficult to figure out when emulation would get triggered, and believe me it was something to avoid.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Emulation is where we cannot provide the Data bp using a register.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Instead we single step and check the value at the end of each step.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This is slow.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Not just slow, incredibly slow.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Go walk the dog, get a cup of coffee, read the newspaper slow.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;There are a few tricks we could have done to keep the old&amp;nbsp;UI and avoid emulation, but they fall down in certain cases.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;We didn't want to have data bps, and 'sort of data bps'.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; Instead, w&lt;/SPAN&gt;e made a decision to expose what really works in a simpler manner.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That avoids the trap of accidentally falling into 'emulation'.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;At the beginning I mentioned that people sometimes confuse the bells and whistles with the type of breakpoint.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The bells and whistles apply to both kinds of underlying bps.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Each of those bells and whistles is (10 cent word warning) Orthogonal.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You can add a condition to a data bp, or add a hit count, or make a data bp into a data bp tracepoint with 'When hit'.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;All of these are accessible via a right click in the breakpoint window.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Composing those bells and whistles can provide powerful debugging techniques.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Just make sure you are using the right kind of underlying bp.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=485792" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>Stop Mid Func Eval, Nested Break States</title><link>http://blogs.msdn.com/stevejs/archive/2005/10/23/484024.aspx</link><pubDate>Mon, 24 Oct 2005 04:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:484024</guid><dc:creator>SteveJS</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/484024.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=484024</wfw:commentRss><description>&lt;P&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;A coworker mentioned Func Eval sounds like "Funky-val".&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Stopping at a breakpoint in the middle of a function evaluation could be considered funky.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It is also useful.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;VS Whidbey allows stopping at a BP or Exception during a function evaluation in C# or VB code.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;To use it, you need to do the function evaluation from the 'Immediate Window', rather than the 'Watch', or 'Quick Watch' windows.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Why&amp;nbsp;is nesting restricted to the Immediate Window?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Despite the name, the Immediate window is not immediate.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Watch windows do synchronous Function evaluation.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If the evaluation takes too long, it will timeout and give an error.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That doesn't happen in the immediate window, because it is infinitely patient.&amp;nbsp; The immediate window is implementing a REPL (Read Eval Print Loop).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;However, it doesn't bother to wait for the Eval &amp;amp; Print to finish, instead it executes an asynchronous func eval. The 'Print' is going to happen whenever the Eval gets done, which allows us to do the Nested Break States.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Here's an example:&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;static bool Foo()&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;{&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in 0in 0in 0.5in; FONT-FAMILY: Verdana; mso-outline-level: 2"&gt;return false;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;}&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;In the immediate window evaluate Foo 3 times:&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;?Foo()&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;?Foo()&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;?Foo()&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Here is the Callstack:&lt;/P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/41403334@N00/55374065/"&gt;&lt;IMG height=200 alt=NestedFuncEval src="http://static.flickr.com/29/55374065_99f438323d_o.jpg" width=513&gt;&lt;/A&gt; 
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;When I unrolled the set of Evaluations by hitting F5 three times, here is what I got in the immediate Window:&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;?Foo()&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;?Foo()&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;?Foo()&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;false&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;false&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;true&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;You might ask … why is the last one true?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It's because I used Edit and Continue to change the return value to true before hitting F5 the third time.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Nested Func Eval allows you to literally "push a debug task" on the stack.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Once you've figured out why Foo was doing something wrong you can go back to debugging what you were looking at before.&lt;BR&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=484024" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>More hours in the day</title><link>http://blogs.msdn.com/stevejs/archive/2005/10/20/483107.aspx</link><pubDate>Thu, 20 Oct 2005 19:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:483107</guid><dc:creator>SteveJS</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/stevejs/comments/483107.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevejs/commentrss.aspx?PostID=483107</wfw:commentRss><description>&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;In the summer of '94 I sketched a design for my ideal&amp;nbsp;'mp3' player.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;I didn't spec the compression format.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If I had, it would have been called a &lt;A href="http://en.wikipedia.org/wiki/Mp3 "&gt;'bit' player&lt;/A&gt;&amp;nbsp;back then.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;I wanted a walkman replacement.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;However, the feature I&amp;nbsp;most craved was understandable fast play, and rewind.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;My motive was to record all my lectures for a day, then listen to them later in fast play, thus&amp;nbsp;creating more hours in my day.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;In &lt;A href="http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-111Introductory-Digital-Systems-LaboratoryFall2002/CourseHome/index.htm"&gt;'Digital Death Lab' &lt;/A&gt;class, my lab partner, Gio, and I had implemented&amp;nbsp;fast play as&amp;nbsp;our final project. &amp;nbsp;Maintaining pitch is the hard part, you can toss pauses between words, but you can't just toss samples without making&amp;nbsp;it sound like &lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/B0000C0FKK/102-2363746-4474537?v=glance"&gt;'A Very Special&amp;nbsp;Chipmunks&amp;nbsp;Physics Lecture'&lt;/A&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;I&amp;nbsp;see that&amp;nbsp;&lt;/SPAN&gt;Windows media player 10 has fast play.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Does anyone know if mobile products expose it?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Do any mp3 players&amp;nbsp;solve my&amp;nbsp;'more hours in the day scenario' for a mobile device?&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=483107" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevejs/archive/tags/Babble/default.aspx">Babble</category></item></channel></rss>