Skip to content

Commit

Permalink
debug: use lldb or gdb for cppdbg using the OS defaults
Browse files Browse the repository at this point in the history
We shouldn't infer what debugger to use based on the compiler
command. Instead we use the defaults based on the OS:
https://code.visualstudio.com/docs/cpp/launch-json-reference#_mimode
  • Loading branch information
ylatuya authored and tristan957 committed Aug 16, 2024
1 parent 5720bde commit 5cc1b7b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/debug/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as os from "os";
import * as vscode from "vscode";
import * as path from "path";
import { getMesonTargets } from "../introspection";
Expand Down Expand Up @@ -78,9 +79,7 @@ export class MesonDebugConfigurationProvider implements vscode.DebugConfiguratio

if (type === DebuggerType.cppdbg) {
let miMode;
if (
target.target_sources?.some((source) => source.compiler != null && ["cc", "clang"].includes(source.compiler[0]))
) {
if (os.platform() === "darwin") {
miMode = MIMode.lldb;
} else {
miMode = MIMode.gdb;
Expand Down

0 comments on commit 5cc1b7b

Please sign in to comment.