mdbg

Cannot Detach from process using mdbg

Following on from this question I now have code that can attach to a process using the Mdbg API. The problem is that I can't detach from the process if I need to. When I call mgProcess.Detach().WaitOne(); ( where mgProcess is a MDbgProcess created from an MDbgEngine object ) I get the following error message: Process not synchronized...

Web Based Stack Dump Tool for ASP.NET Using Mdbg?

There is a great presentation by Dan Farino, Chief Systems Architect at MySpace.com, showcasing a web-based stack dump tool that catalogues all threads running in a given process (what they're doing, how long they've been executing, etc.) Their techniques are also summarized on highscalability.com: PerfCollector. Centralized collect...

Evaluating static methods (with parameters) using MDbg

How do you evaluate a static method that takes parameters using MDbg on the command-line? To call Assembly.GetCallingAssembly(), this works: mdbg> funceval System.Reflection.Assembly.GetCallingAssembly How would you call the Assembly.Load method? eg. Assembly.Load("Foo.Bar") ...

How do I programmatically enumerate types in a running .NET process using MDbg?

I want to print out a list of all the different Types loaded in a running .NET process. My plan is to eventually build a GUI app based on this, so I want to do this from my code as opposed to a third party tool. I think my best bet is to use MDbgCore to attach to the running process, and then use MDbgProcess.AppDomains to get CorAppDomai...

Where can I get Mdbg?

I'd like to be able to debug .net code using Mdbg. Is there any way of getting it besides installing Visual Studio ( assuming this is a valid way of obtaining ) ? ...

Does the mdbg managed debugger sample exist for .NET 4.0?

Is there a .NET 4.0 version of the mdbg managed debugger source ? I need to port my CPU analyzer, and ICorDebug has changed a bit in .NET 4.0. ...

mdbg can't debug my hello world program

In order to try out mdbg, I have the following simple hello world program: // kkk.cs using System; class HelloMain { static public void Main() { Console.WriteLine("Hello"); } } Compile it with csc /debug kkk.cs, this yields: kkk.exe kkk.pdb I then do (from the visual studio command line): mdbg kkk.exe or ...