Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #16965 - roife:use-lldb-for-cpp-ext, r=lnicola
fix: use lldb when debugging with C++ extension on MacOS See https://github.com/rust-lang/rust-analyzer/issues/16901#issuecomment-2024486941 This PR resolves the issue of being unable to debug using the C++ extension on macOS. By using special configurations for the `MIMode` on macOS, it enables the C++ extension to connect to lldb when debugging (without affecting other platforms).
bors 2024-03-28
parent 4bf521d · parent 3521089 · commit 29a8e65
-rw-r--r--editors/code/src/debug.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts
index cd7e7c35e9..bad1f48de8 100644
--- a/editors/code/src/debug.ts
+++ b/editors/code/src/debug.ts
@@ -203,6 +203,10 @@ function getCCppDebugConfig(
cwd: cargoWorkspace || runnable.args.workspaceRoot,
sourceFileMap,
env,
+ // See https://github.com/rust-lang/rust-analyzer/issues/16901#issuecomment-2024486941
+ osx: {
+ MIMode: "lldb",
+ },
};
}