6

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

mdbg !r kkk.exe

I got:

Error: The request is not supported. (Exception from HRESULT: 0x80070032)
0

2 Answers 2

8

I know this question is super old, but I just ran into this and found the 'fix' for this problem. Adding here for any other Googlers..

I have two directories:

  • C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\Mdbg.exe
  • C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\x64\Mdbg.exe

Make sure you're launching the correct version (in my case, the x64 version) and doing a 'Run as Administrator' when opening the command prompt.

1
  • 2
    I wanted the x64 build of mdbg so I followed the instructions above. But after I'd installed the SDK on my Win XP machine there was no .\x64 folder. When I repeated the SDK installation on a Win7 x64 machine the .\x64 folder was created and populated. Mar 20, 2014 at 10:29
7

Try csc /debug /platform:x86 kkk.cs

You're running on 64-bit Windows. Mdbg is a 32-bit process and can only debug 32-bit processes.

4
  • It is possible to let mdbg debug x64 binaries? Or, should I use x64 version mdbg? If mdbg is only able to debug x86 applications, is that too limited?
    – user469591
    Oct 7, 2010 at 21:08
  • I don't know if there is a 64-bit version of mdgb. I stopped trying to use it shortly after I encountered this same thing. VS is good enough for debugging managed apps 95% of the time. I use Windbg for that 5%.
    – Tergiver
    Oct 7, 2010 at 21:12
  • Thanks for the help! It was very helpful! It seems that mdbg is indeed quite limited (if it is this case).
    – user469591
    Oct 7, 2010 at 21:24
  • Argggghhhhhh! Stupid thing just bit me :(
    – leppie
    Aug 4, 2011 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.