ohmtech-rdi / eurorack-blocks

Software to Hardware Prototyping for Eurorack using C++, Max/Gen~ or Faust
Other
296 stars 19 forks source link

Can't debug module with VS Code on macOS #571

Open ohmtech-rdi opened 1 year ago

ohmtech-rdi commented 1 year ago

Tested on macOS 10.15, Xcode 11.3 is installed.

ERROR: LLDB exited unexpectedly with exit code 137 (0x89). Debugging will now abort.

Could be related to the absence of lldb-mi. Maybe more informations here. If this is the case, we could include it to our toolchain.

ohmtech-rdi commented 1 year ago

Copying

/Users/***/.vscode/extensions/ms-vscode.cpptools-1.15.4-darwin-x64/debugAdapters/lldb-mi/bin/lldb-mi

to my

/Applications/Xcode113.app/Contents/SharedFrameworks/

and then referencing it in the launch configuration:

         "osx": {
            "MIMode": "lldb",
            "program": "/Applications/VCV Rack 2 Pro.app/Contents/MacOS/Rack",
            "miDebuggerPath": "/Applications/Xcode113.app/Contents/SharedFrameworks/lldb-mi"
         }

Makes debugging possible, so it seems to be clearly related to that.

Note that my Xcode doesn't have a standard name, if the extension used a hardcoded path to Xcode.app. Yet:

$ xcode-select -p
/Applications/Xcode113.app/Contents/Developer

All in all, debugging on VSCode will require LLDB.framework from Xcode, so I'm wondering if we should put it as part of our toolchain?

Another option would be to not rely on our make configuration and instead go for the most vanilla project on VS Code for C++? It is not clear if the workaround above is not required anyway.