Open spencerkohan opened 3 years ago
I'm not sure. CodeLLDB works for me on Linux IIRC out of the box, but not the Microsoft C++ extension. I guess it might be different on MacOS. Maybe try asking in https://github.com/vadimcn/vscode-lldb/.
I am having the exact same issue on my Mac. Everything was working perfectly fine until I updated VS code and then started getting errors when using the Debug link in tests. Standalone debugging works fine though so it has something to do with the generated debug launch config being created.
I'm trying to get the debugger working for unit tests running via code lens.
I found this project which appears to be integrated with rust-analyzer now. So as far as I have gotten is:
Debug
link above the#[test]
annotation in my Rust codeexpected behavior:
Test runs and breaks to the debugger at the given point
actual behavior:
VSCode shows an alert with the message:
process exited with status -1
and links to thelaunch.json
.So I guess this is a problem of the launch configuration?
Currently this is what I have (it was created automatically by VSCode and I haven't touched it):
Obviously this is a chrome launch task, so it won't work. But I could not find documentation on what the correct configuration should be. Does that doc exist anywhere?
Also in case it's important, the project is a rust workspace, and it also contains a VSCode extension in the top level directory, so maybe that is why VSCode thinks it's a js/web project?
The crate where the test is written is a library.
edit:
So actually it looks like the correct debug launch config is being generated somewhere. If I look at the
Debug
channel output in VSCode I see the following:Which seems reasonable. Is it possible this has something to do with the fact that I'm on an M1 Mac?
Is there any way to get more details on exactly which process is failing?
More info on my setup here:
system: MacBook Air M1 202 / macOS 11.0.1 vscodium details: Version: 1.53.2 Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4 Date: 2021-02-12T00:30:20.237Z (6 days ago) Electron: 11.2.1 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Darwin x64 20.1.0 rust-analyzer version: 0.2.481