The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Interesting CLR Tricks...

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
douglas reilly

Posts: 108
Nickname: dougreilly
Registered: Oct, 2003

douglas reilly is the owner of Access Microsystems Inc., a small software development consulting fir
Interesting CLR Tricks... Posted: Oct 31, 2003 8:09 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by douglas reilly.
Original Post: Interesting CLR Tricks...
Feed Title: Doug Reilly's Weblog
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/dreilly/rss.aspx
Feed Description: ASP.NET and More...
Latest .NET Buzz Posts
Latest .NET Buzz Posts by douglas reilly
Latest Posts From Doug Reilly's Weblog

Advertisement

From the CLR Internals talk at PDC, a really useful tidbit. 

Create a module with a call early to System.Diagnostics.Debugger.Launch.  Create a method that does not get called until after the call to Launch.

Compile the assembly, using /debug:pdbonly switch.  This tells the compiler to create the PDB, but otherwise creates code that is release mode.

When the code hits the Launch() call, the debugger pops up.  Because of the way the JIT compiler works (compiling on the first call to a method) when you call a method not previously called) the code the JIT emits will be debug code, since it knows you are in the debugger, and since you have the pdb lying around, you are in business.  Very cool.

(Note to folks at PDC, CLR Internals talk is amazing so far.  I am sitting way in the back against the wall).

 

Read: Interesting CLR Tricks...

Topic: PDC Entry- In-Depth Programming with Web Services and SQL Server "Yukon" Previous Topic   Next Topic Topic: The original CLR Blogger is Back!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use