Skip to content

[lldb] Look for lldb-dap instead of lldb-vscode in the toolchain #626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,13 @@
"swift.debugger.useDebugAdapterFromToolchain": {
"type": "boolean",
"default": false,
"description": "Use lldb-vscode packaged with Swift toolchain as your debug adapter. This is currently only available on Windows platforms",
"description": "Use lldb-dap packaged with Swift toolchain as your debug adapter. This is currently only available on Windows platforms",
"order": 1
},
"swift.debugger.path": {
"type": "string",
"default": "",
"description": "Path to lldb-vscode debug adapter.",
"description": "Path to lldb-vscode or lldb-dap debug adapter binary.",
"order": 2
}
}
Expand Down Expand Up @@ -991,4 +991,4 @@
"@types/lcov-parse": "1.0.0",
"lcov-parse": "1.0.0"
}
}
}
8 changes: 4 additions & 4 deletions src/debugger/debugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import configuration from "../configuration";
import contextKeys from "../contextKeys";

/**
* Class managing which debug adapter we are using. Will only setup lldb-vscode if it is available.
* Class managing which debug adapter we are using. Will only setup lldb-dap if it is available.
*/
export class DebugAdapter {
private static debugAdapaterExists = false;
Expand All @@ -44,13 +44,13 @@ export class DebugAdapter {
const useCustom = configuration.debugger.debugAdapterPath.length > 0;
const lldbDebugAdapterPath = useCustom
? configuration.debugger.debugAdapterPath
: workspace.toolchain.getToolchainExecutable("lldb-vscode");
: workspace.toolchain.getToolchainExecutable("lldb-dap");
if (!(await this.doesFileExist(lldbDebugAdapterPath))) {
if (!quiet) {
vscode.window.showInformationMessage(
useCustom
? "Cannot find lldb-vscode debug adapter specified in setting Swift.Debugger.Path."
: "Cannot find lldb-vscode debug adapter in your Swift toolchain."
? "Cannot find debug adapter binary specified in setting Swift.Debugger.Path."
: "Cannot find lldb-dap in your Swift toolchain."
);
}
workspace.outputChannel.log(`Failed to find ${lldbDebugAdapterPath}`);
Expand Down
6 changes: 3 additions & 3 deletions src/debugger/debugAdapterFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function registerLLDBDebugAdapter(workspaceContext: WorkspaceContext): vs
const lldbDebugAdapterPath =
configuration.debugger.debugAdapterPath.length > 0
? configuration.debugger.debugAdapterPath
: workspaceContext.toolchain.getToolchainExecutable("lldb-vscode");
: workspaceContext.toolchain.getToolchainExecutable("lldb-dap");
executable = new vscode.DebugAdapterExecutable(lldbDebugAdapterPath, [], {});
}

Expand All @@ -52,9 +52,9 @@ export function registerLLDBDebugAdapter(workspaceContext: WorkspaceContext): vs
};
}

/** Provide configurations for lldb-vscode
/** Provide configurations for lldb-dap
*
* Converts launch configuration that user supplies into a version that the lldb-vscode
* Converts launch configuration that user supplies into a version that the lldb-dap
* debug adapter will use. Primarily it converts the environment variables from Object
* to an array of strings in format "var=value".
*
Expand Down