code-debug icon indicating copy to clipboard operation
code-debug copied to clipboard

Can't seem to run mago-di on Windows

Open AndrejMitrovic opened this issue 6 years ago • 4 comments

On a fresh dub init project, I've tried to run the debugger with this config:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "mago-debug",
            "type": "mago-mi",
            "request": "launch",
            "target": "debug-test.exe",
            "cwd": "${workspaceRoot}",
            "valuesFormatting": "parseText",
            "printCalls": true,
            "showDevDebugOutput": true
        }
    ]
}

Pressing the debug button makes the vscode GUI animated for a split second, but nothing else happens. There is nothing in any of the 'problems / output / debug console / terminal' views.

mago-mi is in my path:

drey@DREYS-PC C:\dev                                                                                            
$ where mago-mi                                                                                                 
C:\Program Files (x86)\VisualD\mago-mi.exe                     

Is there any other way I can enable some form of logging to see what's going on?

AndrejMitrovic avatar Jun 02 '19 02:06 AndrejMitrovic

with printCalls and showDevDebugOutput you already enabled maximum logging. Try maybe setting magomipath to "C:\\Program Files (x86)\\VisualD\\mago-mi.exe"

Otherwise I would try the C/C++ extension instead for debugging D code.

WebFreak001 avatar Jun 02 '19 09:06 WebFreak001

@AndrejMitrovic Several remarks regarding mago-mi:

  • today a bug was solved by Rainer which blocked the usage of mago-mi https://github.com/rainers/mago/issues/31
  • there was a bug in mago-mi if you start it via PATH environment variable. Also now solved by Rainer some hours ago https://github.com/rainers/mago/issues/30
  • for debugging x86 coff or x86_64 applications you have to do a lot of manually steps. You need in addition to mago-mi also mago remote and some dlls. In addition a registry key must point to mago remote executable. Also you need to register msdia140.dll (x86/ x86_64). The dll is included in VS Build tools. For details see here https://github.com/rainers/mago/issues/25

Still I am not able to debug an application with VSC and mago-mi. While I can debug an application directly powershell, the exact same commands fails in VSC.

andre2007 avatar Aug 06 '19 18:08 andre2007

Hey, thanks a lot for the update @andre2007! I'll check it out soon.

AndrejMitrovic avatar Aug 07 '19 01:08 AndrejMitrovic

Also see here https://github.com/WebFreak001/code-debug/issues/189

andre2007 avatar Aug 07 '19 07:08 andre2007