crystal-lang-tools / vscode-crystal-lang

Yet another VSCode extension for Crystal Programming Language
https://marketplace.visualstudio.com/items?itemName=crystal-lang-tools.crystal-lang
MIT License
276 stars 58 forks source link

Debugger not working, undefinedMI: Error #101

Closed texpert closed 4 years ago

texpert commented 4 years ago

Hello!

Thanks for the great work on this extension!

Could you, please, help with the following?!

MacOS Sierra, VS Code 1.39.1, 1.39.2, Crystal 0.31.1

Tried in vain to set some breakpoints to debug a POC program (the program is building OK) - the following error is persisting in the Debug Console:

undefinedMI: Error: Driver. LLDB Debugger. 
MI: Error: Driver Manager. Driver 'Machine Interface Driver Version: 1.0.0.9' (ID:'MIDriver') initialise failed. Driver. LLDB Debugger.

The lldb-mi is present in the path, I've made a symlink:

$ ln -s /usr/local/Cellar/llvm@8/8.0.1/bin/lldb-mi /usr/local/bin/lldb-mi

$ which lldb-mi
/usr/local/bin/lldb-mi

The launch.json is typical:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug",
            "type": "lldb-mi",
            "request": "launch",
            "target": "./bin/${workspaceFolderBasename}",
            "cwd": "${workspaceRoot}",
            "preLaunchTask": "Compile",
            "valuesFormatting": "parseText"
        }
    ]
}
texpert commented 4 years ago

Turns out to be a lldb-mi bug - weird Python dependency trail from lldb. Has compiled it locally, commenting the dependency, and it is running now. Though, the debugging still doesn't work, no stop at breakpoint, no output from the application.