Questions tagged [mdbg]

MDbg is a .NET Framework Command-Line Debugger for managed code.

MDbg is a .NET Framework Command-Line Debugger for managed code. It's part of the debugging tools for .NET.

Resources:

34 questions
9
votes
4 answers

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 ) ?
Geo
  • 93,257
  • 117
  • 344
  • 520
6
votes
2 answers

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…
user469591
  • 71
  • 1
  • 2
5
votes
2 answers

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…
Nariman
  • 6,368
  • 1
  • 35
  • 50
4
votes
1 answer

Unable to func-eval using Mdbg due to "code is optimized" exception

We are using MdbgCore.dll to evaluate a property off a parameter on a thread callstack. To do this, we are performing a func-eval. Unfortunately, all our attempts to perform the func-eval are failing with CORDBG_E_ILLEGAL_IN_OPTIMIZED_CODE, which…
ionwarp
  • 215
  • 1
  • 10
4
votes
0 answers

Standalone debugging for .NET Core/Full CLR applications

We need to debug .NET Full CLR and Core CLR applications running on production Windows servers, without the possibility of resorting to remote debugging (msvsmon), or installing a full IDE (Visual Studio/Visual Studio Core, ...). How could we debug…
Mathieu Renda
  • 14,069
  • 2
  • 35
  • 33
4
votes
2 answers

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.
Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
3
votes
1 answer

Good Resources on CorDbg & Mdbg

I am looking for some good resources of information about the CorDbg & Mdbg debuggers in .NET as well as some stuff about MSIL(CIL).
harryovers
  • 3,087
  • 2
  • 34
  • 56
3
votes
1 answer

Debugger StepInto auto-generated code and JMC issue

I'm making a managed .NET debugger using MDBG sample. Currently I'm struggling with StepInto behavior, while StepOut and StepOver seems to work. To achieve Just-My-Code stepping I'm calling SetJMCStatus on modules load. That works fine and allow me…
3615
  • 3,787
  • 3
  • 20
  • 35
3
votes
1 answer

Func-eval on polymorphic classes

I'm making a managed .NET debugger using MDBG sample. MDBG sample operates only on top level class of given instance, not searching deep inside class hierarchy. I was able to go through hierarchy and get all available methods. But a problem occurs…
3615
  • 3,787
  • 3
  • 20
  • 35
3
votes
1 answer

Get base class hierarchy methods with IMetaDataImport EnumMethods

I'm trying to implement managed debugger looking at MDBG sample. MDBG is capable of resolving function names within given scope, but it's not taking in consideration base classes. MDBG is doing this: /// /// Resolves a Function…
3615
  • 3,787
  • 3
  • 20
  • 35
3
votes
2 answers

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…
glenatron
  • 11,018
  • 13
  • 64
  • 112
3
votes
3 answers

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…
TarkaDaal
  • 18,798
  • 7
  • 34
  • 51
2
votes
2 answers

Attaching to w3wp using mdbg

I am trying to attach to the w3wp process using the command line managed debugger (mdbg). I am not able to see the process in the list of processes with the "a" command. I am sure that the problem is that the w3wp process is running in another…
2
votes
1 answer

Roslyn: Given a source location/line, how to figure out if - and where - breakpoint can be set

I'm working on a code editor using Roslyn and, for debugging, MDbg. In the editor, I'm aiming for visual studio-like behavior for setting breakpoints. That is, the user can click on a line, and I will need to figure out Is that a source location at…
Bogey
  • 4,926
  • 4
  • 32
  • 57
2
votes
0 answers

Managed .NET debugger and async/await methods

I'm making a managed .NET debugger using MDBG sample. Consider some simple async example: 1: private async void OnClick(EventArgs args){ 2: var obj = new SomeClass(); 3: bool res = await…
3615
  • 3,787
  • 3
  • 20
  • 35
1
2 3