CLR Managed Debugger——原来Managed代码也能做这些

微软公司刚刚发布的CLR Managed Debugger (mdbg) Sample是一个颇为完善的C# 应用程序——调试器的源代码。它为我们充分展示了Managed代码的能力(虽然很多底层还是靠Unmanaged API实现的),远远不止做做ASP.NET网站而已。这也正是我们深入了解、学习C#的好材料。

这个版本有了一些变化:其中IronPython简直太酷了!

  1. Mdbg + IronPython integration. (You need to download IronPython separately)
  2. Managed wrappers for native debugging APIs like WaitForDebugEvent
  3. Improved event logging infrastructure
  4. Pdb2Xml conversion tool, which now includes round-tripping the pdbs
  5. Updated EULA
  6. All IL files have been converted into C#, so it's now a pure C# solution
  7. Bug fixes

用Visual Studio打开下载文件中包含的解决方案,可以看到,项目还是比较复杂的:

打开corapi项目中的Debugger.cs,核心实现很多都在这里:

demo目录下有3个演示程序,都挺有意思的。其中有个IronPython的,确实了不得……

当然,这个Debugger肯定没法和Visual Studio相比,只能作为学习之用。这两个地方可以找到更多关于该Debugger的信息:

  1. Mike Stall's CLR Debugging Blog
  2. CLR Developer Tools Forum (Includes Mdbg Discussion)
posted on 2006-11-23 12:06  Dflying Chen  阅读(1835)  评论(0编辑  收藏  举报