<?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>Debugging Dynamically Generated Code (Reflection.Emit)</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx</link><description>The CLR supports the ability to generate code at runtime (Reflection.Emit). This is great for the many dynamic languages targeting the runtime (such as Iron Python ). We also support that ability to provide debugging information for that code so that</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Debugging Dynamically Generated Code (Reflection.Emit)</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#366520</link><pubDate>Thu, 03 Feb 2005 23:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:366520</guid><dc:creator>Ernie Booth</dc:creator><description>Mike this is great stuff, I look forward to using it!!  Hope to see you next week at the Compiler Lab.&lt;br&gt;&lt;br&gt;- Ernie</description></item><item><title>re: Debugging Dynamically Generated Code (Reflection.Emit)</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#366542</link><pubDate>Thu, 03 Feb 2005 23:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:366542</guid><dc:creator>smidgeonsoft</dc:creator><description>I have been able to debug this puppy using PEBrowse Interactive and to step into the Main method of the HelloWorld program!  But, it takes some effort (and exposed a few bugs in my code -- thanx!) You run the Main from EmitHelloWorld and continue execution to just before the code calls System.Reflection.MethodBase::Invoke.  Then you enable PI's Debug/Break on JIT Event option and continue running until a method shows up with no method name.  This is the Main of the emitted code.  Not pretty, but it works.  I see that this does not run as a &amp;quot;normal&amp;quot; managed executable (and does not show up in TaskManager.)</description></item><item><title>re: Debugging Dynamically Generated Code (Reflection.Emit)</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#366733</link><pubDate>Fri, 04 Feb 2005 04:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:366733</guid><dc:creator>Jamie Cansdale</dc:creator><description>Wow, you keep putting out some great posts. :)&lt;br&gt;&lt;br&gt;I tried this with the latest release of Visual C# Express and found that it hit the breakpoint just as you describe.  I now want to go a step further and get Edit &amp;amp; Continue working on the emited code.  I just want to get it working with C#, I have no plans to implement my own language!&lt;br&gt;&lt;br&gt;I tried changing Source.txt to Source.cs and replacing it with valid C# code.  I then fixed the MarkSequencePoint calls to make them correlate (roughly) with the new code.  I also changed DefineDocument to use SymLanguageType.ILAssembly, SymLanguageVendor.Microsoft, SymDocumentType.Text.&lt;br&gt;&lt;br&gt;I was hoping this would allow me to use Edit &amp;amp; Continue on my generated code.  No such luck though, the sequence points just dissapear when I edit the code.  Is there a trick to let Visual Studio know that generated code is C# and a valid target for E&amp;amp;C?&lt;br&gt;&lt;br&gt;Thanks!  Jamie.</description></item><item><title>re: Debugging Dynamically Generated Code (Reflection.Emit)</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#366809</link><pubDate>Fri, 04 Feb 2005 07:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:366809</guid><dc:creator>Mike Stall</dc:creator><description>Ernie / Jamie - Thanks! Glad you find it useful.  &lt;br&gt;&lt;br&gt;Russ (Smidgeonsoft) - It's cool that PEBrowse can handle this. Nice! Reflection emit is not creating a new executable, and so won't show up as a new process in taskman. This is all in a single process.&lt;br&gt;&lt;br&gt;Jamie - EnC doesn't work w/ Ref-emit. I think that deserves its own post. Stay tuned.&lt;br&gt;</description></item><item><title>re: Debugging Dynamically Generated Code (Reflection.Emit)</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#367161</link><pubDate>Fri, 04 Feb 2005 20:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:367161</guid><dc:creator>Mike Stall</dc:creator><description>Jamie - I just posted about why you can't do EnC w/ emit in more detail: &lt;a target="_new" href="http://blogs.msdn.com/jmstall/archive/2005/02/04/367159.aspx"&gt;http://blogs.msdn.com/jmstall/archive/2005/02/04/367159.aspx&lt;/a&gt;&lt;br&gt;</description></item><item><title>re: Debugging Dynamically Generated Code (Reflection.Emit)</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#367781</link><pubDate>Sat, 05 Feb 2005 22:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:367781</guid><dc:creator>Wembly</dc:creator><description>This is SERIOUSLY cool.  I can't wait!!</description></item><item><title>re: Debugging Dynamically Generated Code (Reflection.Emit)</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#368039</link><pubDate>Sun, 06 Feb 2005 19:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:368039</guid><dc:creator>Mike Stall</dc:creator><description>Wembly - You don't have to wait. This is all in v1.0!</description></item><item><title>Source for a C# compiler written in pure C#.</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#368193</link><pubDate>Mon, 07 Feb 2005 05:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:368193</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description /></item><item><title>re: Source is available for MDbg Winforms GUI!</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#369598</link><pubDate>Wed, 09 Feb 2005 06:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:369598</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description /></item><item><title>DebuggableAttribute and dynamic assemblies</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#432923</link><pubDate>Mon, 27 Jun 2005 06:05:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:432923</guid><dc:creator>Rick Byers</dc:creator><description>Mike Stall has a great little sample showing how to make your dynamically generated code debuggable.&amp;amp;amp;nbsp;...</description></item><item><title>Debug support for arbitrary state-machines</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#443718</link><pubDate>Wed, 27 Jul 2005 07:36:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:443718</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>I mentioned here&amp;amp;amp;nbsp; that if your language compiles to IL, then you get free debugging support with...</description></item><item><title>Debug support for arbitrary state-machines</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#443941</link><pubDate>Wed, 27 Jul 2005 22:29:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:443941</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>I mentioned here&amp;amp;amp;nbsp; that if your language compiles to IL, then you get free debugging support with...</description></item><item><title>Debug support for arbitrary state-machines</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#444455</link><pubDate>Thu, 28 Jul 2005 19:02:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:444455</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>I mentioned here&amp;amp;amp;nbsp; that if your language compiles to IL, then you get free debugging support with...</description></item><item><title>Going from IL to Source</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#471284</link><pubDate>Mon, 19 Sep 2005 18:17:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:471284</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...</description></item><item><title>Iron Python 1.0 is released</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#742271</link><pubDate>Wed, 06 Sep 2006 08:31:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:742271</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>You probably already read this 100 times, but Iron Python 1.0 is released. Check out Jim Hugunin's reflections...</description></item><item><title>LoadClass events are usually meaningless</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#749550</link><pubDate>Mon, 11 Sep 2006 18:12:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:749550</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>ICorDebug notifies a debugger when a managed class is loaded via LoadClass debug event. For dynamic-modules,...</description></item><item><title>LCG + Debuggability, and your feedback</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#1077622</link><pubDate>Tue, 14 Nov 2006 23:58:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1077622</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>&lt;p&gt;I mentioned earlier that you can debug Reflection.Emit code . Unfortunately, Ref.Emit code can't be unloaded&lt;/p&gt;
</description></item><item><title>Your feedback: How many types do you ref.emit into a module?</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#1241353</link><pubDate>Fri, 08 Dec 2006 20:21:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1241353</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>&lt;p&gt;I'm looking for feedback about Ref.Emit usage patterns. When using Ref.Emit , how many types do you generally&lt;/p&gt;
</description></item><item><title>Dinis Cruz Blog  &amp;raquo; Blog Archive   &amp;raquo; Firefox Dump - 15 Dec 06  </title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#1289736</link><pubDate>Fri, 15 Dec 2006 03:50:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1289736</guid><dc:creator>Dinis Cruz Blog  » Blog Archive   » Firefox Dump - 15 Dec 06  </dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blogs.owasp.org/diniscruz/2006/12/14/firefox-dump/"&gt;http://blogs.owasp.org/diniscruz/2006/12/14/firefox-dump/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Fake attach event ordering</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#1487296</link><pubDate>Thu, 18 Jan 2007 08:01:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1487296</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>&lt;p&gt;When you attach to a managed debuggee (via ICorDebug::DebugActiveProcess), ICorDebug generates a set&lt;/p&gt;
</description></item><item><title>UpdateModuleSysmbols comes on attach</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#1487314</link><pubDate>Thu, 18 Jan 2007 08:06:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1487314</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>&lt;p&gt;I forgot about UpdateModuleSysmbols when I described the fake debug events sent on attach . This event&lt;/p&gt;
</description></item><item><title>Describing Types in .NET</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#1890547</link><pubDate>Fri, 16 Mar 2007 02:09:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1890547</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>&lt;p&gt;There are several different APIs for handling Types in .NET. Criteria : For each category I want to call&lt;/p&gt;
</description></item><item><title>Debugger talk at Compiler Lab</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#2861959</link><pubDate>Fri, 25 May 2007 08:58:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2861959</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>&lt;p&gt;The CLR team recently had a compiler dev Lab on campus in building 20, with a strong focus on dynamic&lt;/p&gt;
</description></item><item><title>MSBuild 3.5 Tips and a Small MSBuild 4.0 Wish List</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#6126299</link><pubDate>Mon, 12 Nov 2007 07:06:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6126299</guid><dc:creator>John Robbins' Blog</dc:creator><description>&lt;p&gt;Earlier this week, I spent some quality time porting a moderately complicated build over to MSBUILD 3.5,&lt;/p&gt;
</description></item><item><title>Do you compile XML to IL?</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#7921812</link><pubDate>Wed, 27 Feb 2008 22:47:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7921812</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;We need some customer feedback to determine if we fix a regression that was added in VS2008. Any language&lt;/p&gt;
</description></item><item><title>Continuer l&amp;#8217;optimisation avec la Lightweight Code Generation (LCG) &amp;laquo; Codingly</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#8466492</link><pubDate>Wed, 07 May 2008 21:31:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8466492</guid><dc:creator>Continuer l&amp;#8217;optimisation avec la Lightweight Code Generation (LCG) &amp;laquo; Codingly</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://codingly.com/2008/05/06/continuer-loptimisation-avec-la-lightweight-code-generation-lcg/"&gt;http://codingly.com/2008/05/06/continuer-loptimisation-avec-la-lightweight-code-generation-lcg/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Dynamic debugging problem | keyongtech</title><link>http://blogs.msdn.com/jmstall/archive/2005/02/03/366429.aspx#9363617</link><pubDate>Thu, 22 Jan 2009 09:21:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9363617</guid><dc:creator>Dynamic debugging problem | keyongtech</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.keyongtech.com/432492-dynamic-debugging-problem"&gt;http://www.keyongtech.com/432492-dynamic-debugging-problem&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>