Mike Stall's .NET Debugging Blog

Notes on Managed Debugging, ICorDebug, and random .NET stuff

Browse by Tags

Tagged Content List
  • Blog Post: Writing a CLR Debugger in Python

    Harry Pierson has written an excellent set of blog entries about writing a managed debugger in IronPython . He builds on the ICorDebug managed wrappers that we ship in Mdbg and explains many of the concepts for how to write a debugger, such as managing breakpoints.  Read more about them here . 
  • Blog Post: Mdbg (C# debugger in C#) source sample updated

    We've just updated the MDbg sample! This is a full source sample for building a managed debugger in C#. It's available here . (This is the same link as before. If it brings up version 1.0, just try refreshing the page until you get mdbgSample 21 .EXE). We're up to version 2.1.0 , and it includes...
  • Blog Post: Fixing the MDbg / Iron Python extension...

    A while ago, we had a sample of Mdbg-Python extension that let you use python to script MDbg. It was based off a pre-release Iron Python, and things have since broken. We updated at least once to keep up with the breaks. We're aware of the problems and actively updating it to use the latest python (...
  • Blog Post: Working on managed wrappers for Native Debugging API

    FWIW, I've been working on some managed wrappers for the native debugging API ( kernel32!WaitForDebugEvent ,etc) My goals are: Make it extremely easy to use the native debugging API. Maintain fidelity to the native debug API. I didn’t want a super thick wrapper, but I was willing to track...
  • Blog Post: How to build Mdbg apps

    I often publish little samples in this blog based off MDbg (which generally show off the debugging services in some way; such as app to convert Pdb-->XML , or this harness to print all exceptions in an app ). I generally call these apps "harnesses" because they run on another app (the debuggee). I...
  • Blog Post: Managed Stack Explorer

    Check out: Managed Stack Explorer . It's a tool on CodePlex that lets you automatically get stack snapshots of V2 managed processes. Its debugging inspection functionality (viewing callstacks) is built on the CLR Debugging Services via ICorDebug, and access through managed code via the low-level managed...
  • Blog Post: Felice Pollano: Integrating a debugger into Reflector

    Felice Pollano is working on project to make merge Reflector (an IL-->C# decompiler) and Mdbg (a managed debugger). See here for details. I've said at many times this is possible, but have never had the cycles to go do it. (As a side note, there are actually a lot of things that are possible at...
  • Blog Post: Why doesn't MDbg use generics?

    If you've looked at the MDbg sources, you'll notice it looks a lot like a V1.1 app. There are few to no V2 (Whidbey) concepts in there: few anonymous delegates, very little (if any?) generics, no 'yield' keyword. Since MDbg shipped in V2, why didn't we use the greatest stuff from V2? 1. Bootstrapping...
  • Blog Post: Jan is on MSDN TV talking about MDbg

    Jan Stranik is on MSDN TV talking about MDbg , the managed-debugging sample written in C#. See the video here . Jan wrote most of MDbg, and handle a lot of hard problems about getting a working debugger in managed code. He gives a brief overview of managed-debugging and of Mdbg's architecture, including...
  • Blog Post: MDbg, Managed-debugging, and 64 bit

    V2 CLR added support for 64-bit (amd64 and ia64), and that includes managed-debugging support. So a 64-bit MDbg can debug a 64-bit managed app. But what about cross-platform stuff when your debugger and debuggee are different platforms? Here's how MDbg and managed-debugging work across the 32/64 bit...
  • Blog Post: Sample Mdbg extension

    Here is a template for playing around with an extension for the MDbg sample (Mdbg is the managed debuggeer written in C#). It adds an "Addition" command to MDbg that adds two numbers. Not very exciting, but it shows the plumbing. You can download the MDbg sample here . I'll likely update this if I think...
  • Blog Post: MDbg UI Threading, round 2

    The STA/MTA threading problem is (hopefully) fixed in the latest MDbg winforms Gui . (which also has some cool new features, including an IL disassembly window ) The original solution implemented in the original GUI (described here ) had the problem that the UI thread was MTA! This is very bad because...
  • Blog Post: Mdbg IronPython Extension updated for Beta 1

    You probably heard that Iron Python Beta 1 was released . It has a small (but very worthy) breaking change, and I've updated the MDbg-IronPython extension accordingly. I updated it previously for 0.9.3 . The changes are related to redirecting the python console. Here is the progression: // Hook...
  • Blog Post: MDbg sample is updated for VS2005 RTM

    We've updated the MDbg source sample ( download here ) for Visual Studio 2005. This latest round of updates includes an integrated IL view , making the UI thread STA, fixing some build problems with VS2005 RTM and C# Express. It took me under 3 minutes to downloaded it and build it all from scratch...
  • Blog Post: Tool to get snapshot of managed callstacks

    I wrote a simple tool to take a snapshot of a running managed process and dump the output as an XML file. I'll post the full source as a sample on MSDN. [ Update 6/26/06] After great delay, source posted here . Also, check out Managed Stack Explorer , which is a more polished tool that has similar snap...
  • Blog Post: Writing a debugger in VB

    Some might consider writing a managed debugger in VB.Net to be an oxymoron . But maybe not. Here's a VB.Net snippet that serves as a highly-specialized debugger to launch an app and print all the modules that get loaded. This is adapted from the C# sample snippet here that does the same thing. Although...
  • Blog Post: Updated MDbg GUI

    I've updated the MDbg GUI . We'll be integrating this into the actual MDbg sample and it will all be available in the MDbg download. Here's a list of what's improved. I'll certainly post when the download site gets updated. IL support 1) Added integrated IL view ! It shows IL disassembly + native...
  • Blog Post: MDbg Linkfest

    MDbg is a debugger for managed code written entirely in C# (and IL), which started shipping in the CLR 2.0 SDK. I have so many MDbg posts, that I'm losing track of them. And others have had some good posts too. For my own organization, I need to create an easy way to find all the links (particularly...
  • Blog Post: Summary of the role of MDbg and Cordbg

    I want to summarize in one place our views on Mdbg and Cordbg, and our plans for their future. Our views on the different debuggers : Cordbg/Mdbg - In general, we've never viewed Cordbg or MDbg as ideal production quality debuggers. We view Cordbg/Mdbg primarily as test tools and samples of how to...
  • Blog Post: MDbg extension to debug IL

    I've updated the MDbg gui to provide IL debugging. I blogged here that the CLR actually lets you debug at the IL level (with some restrictions), but no debugger actually exposes this feature. People were skeptical, and now that we shipped whidbey, I've had enough time to go add this functionality to...
  • Blog Post: MDbg Sample temporarily broken in post-beta 2 builds.

    Customers have alerted us that the MDBg sample is broken on post-beta 2 builds. Rick Byers has diagnosed the problem as an issue in the mdbg build and we're working to update it. I guess there was a VS change that exposed this problem. Rick may blog a more detailed explanation, but I just wanted to get...
  • Blog Post: Adding IronPython scripting engine to Mdbg

    I hear IronPython is a great managed scripting language to embed in other managed apps, so I thought I'd try this out by writing an MDbg Extension to drop IronPython 0.9.1 into the MDBg Beta 2 sample. (both pieces are publicly available downloads). The experiment went pretty well. I conclude IronPython...
  • Blog Post: Converting a managed PDB into a XML file.

    I wrote some C# sample code to get an ISymbolReader from a managed PDB (Program Database) file and then dump it back out as XML. The managed PDB stores all the source-level debugging information such as: - the mapping between IL offsets and source lines. (Normally a compiler builds up this mapping automatically...
  • Blog Post: MDbg Sample is updated for Beta 2 and RTM

    The Mdbg (a managed debugging written in pure C#) sample, which includes full source, has now been updated and released. The previous sample was for beta 1. This new sample has been updated for Whidbey beta 2 and will also be compatible with the final Whidbey release. The old mdbg beta 1 source sample...
  • Blog Post: Simple harness to print exceptions in an app

    Several people have asked how to write something that runs some executable under a harness and then dumps all the exceptions that are thrown. Back in November, I wrote a similar harness to dump load module events using MDbg . You can easily modify that to dump exceptions. See that blog entry for an explanation...
Page 1 of 2 (35 items) 12