<?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>Code Gen flags while Debugging</title><link>http://blogs.msdn.com/b/jmstall/archive/2005/01/11/350442.aspx</link><description>I ranted here that Debuggers shouldn’t affect behavior . V1.1 had some fundamental violations of this regarding code-gen. We’ve fixed this in v2.0 ICorDebug . This includes: 1) Ensuring that the mere presence of a debugger doesn’t affect codegen flags</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Debugging Ngen code</title><link>http://blogs.msdn.com/b/jmstall/archive/2005/01/11/350442.aspx#789975</link><pubDate>Wed, 04 Oct 2006 18:39:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:789975</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>&lt;p&gt;You can debug ngen (aka prejitted) code from VS2005 and also have the VS2005 IDE launch ngenned code.&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=789975" width="1" height="1"&gt;</description></item><item><title>Mike Stall's .NET Debugging Blog : What's new in v2.0 CLR Debugging (ICorDebug)?</title><link>http://blogs.msdn.com/b/jmstall/archive/2005/01/11/350442.aspx#664611</link><pubDate>Thu, 13 Jul 2006 19:17:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:664611</guid><dc:creator>Mike Stall's .NET Debugging Blog : What's new in v2.0 CLR Debugging (ICorDebug)?</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/jmstall/archive/2005/01/04/346641.aspx"&gt;http://blogs.msdn.com/jmstall/archive/2005/01/04/346641.aspx&lt;/a&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=664611" width="1" height="1"&gt;</description></item><item><title>Going from IL to Source</title><link>http://blogs.msdn.com/b/jmstall/archive/2005/01/11/350442.aspx#471285</link><pubDate>Mon, 19 Sep 2005 18:17:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:471285</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>Question from the mail bag:&lt;br&gt;&lt;br&gt;I am trying to get some information on what I can do usefully with the...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=471285" width="1" height="1"&gt;</description></item><item><title>re: Code Gen flags while Debugging</title><link>http://blogs.msdn.com/b/jmstall/archive/2005/01/11/350442.aspx#364020</link><pubDate>Mon, 31 Jan 2005 23:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:364020</guid><dc:creator>Matt Davis</dc:creator><description>Here's the bigger question (perhaps the one I should've asked first): Should EnC work on unmanaged exe hosts (Excel) in the &amp;quot;launch&amp;quot; scenario, when the unmanaged host loads the CLR during startup? VS allows EnC behavior in this case, but the debugee fails with an ExecutionEngineException whenever I try to apply any code changes (filed a bug on this last week- FDBK20760). I've accepted that it won't work in the &amp;quot;attach&amp;quot; scenario for this release, but I can get a long way if it'll work for &amp;quot;launch&amp;quot;.&lt;br&gt;&lt;br&gt;Seems like the VSTO gang would be clamoring for this to work, and maybe it does when using their loader shims (not included in Nov CTP bits, so I can't try it).&lt;br&gt;&lt;br&gt;I'm trying to sell Whidbey as a replacement for our Excel VBA development, but w/o EnC, the VBA crew isn't buying... So I'm trying anything and everything to make it work. :)&lt;br&gt;&lt;br&gt;Thanks for the dialogue...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=364020" width="1" height="1"&gt;</description></item><item><title>re: Code Gen flags while Debugging</title><link>http://blogs.msdn.com/b/jmstall/archive/2005/01/11/350442.aspx#362836</link><pubDate>Sat, 29 Jan 2005 02:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:362836</guid><dc:creator>Mike Stall</dc:creator><description>Matt - it sounds like you're trying to use the ICorDebug interfaces from within your host (the debuggee)? They're meant to be used from the debugger process (from VS), so you can't really override them from the host.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=362836" width="1" height="1"&gt;</description></item><item><title>re: Code Gen flags while Debugging</title><link>http://blogs.msdn.com/b/jmstall/archive/2005/01/11/350442.aspx#362574</link><pubDate>Fri, 28 Jan 2005 21:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:362574</guid><dc:creator>Mike Stall</dc:creator><description>Jonathan Keljo (Program Manager for the CLR's EnC support) offers this:&lt;br&gt;It was thought about, yes, but there are many more hurdles on the debugger side of the house than there are on the CLR side. The ASP.NET case is particularly problematic since the compilation is generally done by the server, not by the IDE—you can’t do EnC with ASP.NET at all.&lt;br&gt;&lt;br&gt;It wouldn’t be a big deal for the CLR to actually pay attention to the “EnC” bit on the DebuggableAttribute and gen EnC-able code from the get-go such that attach would work at the runtime level. The main technical hurdle is for the debugger—how does it know that the source files it’s looking at haven’t been changed since the particular version of the app you’re attached to was compiled? Nobody we know of is trying to clear that hurdle, so it’s not enabled at our level. (Keeping it simple.)&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=362574" width="1" height="1"&gt;</description></item><item><title>re: Code Gen flags while Debugging</title><link>http://blogs.msdn.com/b/jmstall/archive/2005/01/11/350442.aspx#362538</link><pubDate>Fri, 28 Jan 2005 20:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:362538</guid><dc:creator>Matt Davis</dc:creator><description>Curled up with cordebug.idl last night- does this sound about right? :)&lt;br&gt;&lt;br&gt;CorBindToRuntimeEx(...)&lt;br&gt;&lt;br&gt;Fire up my appdomain, have it load my managed debug shim (that implements ICorDebugManagedCallback)&lt;br&gt;&lt;br&gt;Get ICorDebug from CreateDebuggingInterfaceFromVersion(...)&lt;br&gt;&lt;br&gt;pass my ICorDebugManagedCallback instance to ICorDebug::SetManagedHandler&lt;br&gt;&lt;br&gt;My managed callback's LoadModule method should call ICorDebugModule2::SetJITCompilerFlags to CorDebugJitCompilerFlags.CORDEBUG_JIT_ENABLE_ENC on every module load notification. &lt;br&gt;&lt;br&gt;If that's it- does VS check the module flag before enabling/disabling EnC in the IDE, or does it just assume any process it didn't launch is not EnC capable?&lt;br&gt;&lt;br&gt;I won't keep bugging you about this, but I'm going to code this up today. Am I barking up the right tree, or is it just completely hopeless?&lt;br&gt;&lt;br&gt;Thanks...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=362538" width="1" height="1"&gt;</description></item><item><title>re: Code Gen flags while Debugging</title><link>http://blogs.msdn.com/b/jmstall/archive/2005/01/11/350442.aspx#361984</link><pubDate>Fri, 28 Jan 2005 01:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:361984</guid><dc:creator>Matt Davis</dc:creator><description>Thanks- it's good to know I shouldn't expect it to work (though a little disappointing)... &lt;br&gt;&lt;br&gt;If I'm spinning up the CLR in the host process myself (which I am, in the case I *really* care about), is there any chance the mechanism could be documented to allow EnC to work with an attach (special flags to CorBindToRuntimeEx or extra calls on ICorRuntimeHost, whatever)? Or is it much more involved than that? I do a lot of hosted COM interop development, and the cycle times are really long to tear down the host app, recompile, and re-set everything up every time...&lt;br&gt;&lt;br&gt;Thanks for the quick response!&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=361984" width="1" height="1"&gt;</description></item><item><title>re: Code Gen flags while Debugging</title><link>http://blogs.msdn.com/b/jmstall/archive/2005/01/11/350442.aspx#361972</link><pubDate>Fri, 28 Jan 2005 01:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:361972</guid><dc:creator>Mike Stall</dc:creator><description>Matt - the restriction that EnC is not supported on attach is imposed by ICorDebug. The issue is that we need to know if we're doing EnC during startup because it requires special codegen and special setup. &lt;br&gt;This isn't ideal, but it greatly simplified our EnC implementation and we figured it was a good cost-benefit tradeoff. &lt;br&gt;&lt;br&gt;This is a similar reason to why you currently can't have a clr profiler attach to an already running process either.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=361972" width="1" height="1"&gt;</description></item><item><title>re: Code Gen flags while Debugging</title><link>http://blogs.msdn.com/b/jmstall/archive/2005/01/11/350442.aspx#361958</link><pubDate>Fri, 28 Jan 2005 01:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:361958</guid><dc:creator>Matt Davis</dc:creator><description>So, regarding #4- is the restriction about no Edit/Continue on &amp;quot;attached&amp;quot; processes purely imposed by VS (November CTP bits), or is there a more complex architectural restriction under the covers of the debugging stuff?&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=361958" width="1" height="1"&gt;</description></item></channel></rss>