Skip to content

Always register the swift-lldb debug adapter provider #886

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

Merged
merged 1 commit into from
Jun 13, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/debugger/debugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class DebugAdapter {
: workspace.toolchain.getToolchainExecutable(debugAdapter);
if (!(await this.doesFileExist(lldbDebugAdapterPath))) {
if (!quiet) {
vscode.window.showInformationMessage(
vscode.window.showErrorMessage(
useCustom
? `Cannot find ${debugAdapter} debug adapter specified in setting Swift.Debugger.Path.`
: `Cannot find ${debugAdapter} debug adapter in your Swift toolchain.`
Expand Down
3 changes: 3 additions & 0 deletions src/debugger/debugAdapterFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export function registerLLDBDebugAdapter(workspaceContext: WorkspaceContext): vs
configuration.debugger.debugAdapterPath.length > 0
? configuration.debugger.debugAdapterPath
: workspaceContext.toolchain.getToolchainExecutable(debugAdapter);
DebugAdapter.verifyDebugAdapterExists(workspaceContext).then(() => {
/** Ignore */
});
executable = new vscode.DebugAdapterExecutable(lldbDebugAdapterPath, [], {});
}

Expand Down
8 changes: 4 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ export async function activate(context: vscode.ExtensionContext): Promise<Api |

const testExplorerObserver = TestExplorer.observeFolders(workspaceContext);

if (configuration.debugger.useDebugAdapterFromToolchain) {
const lldbDebugAdapter = registerLLDBDebugAdapter(workspaceContext);
context.subscriptions.push(lldbDebugAdapter);
}
// Register swift-lldb debug provider
const lldbDebugAdapter = registerLLDBDebugAdapter(workspaceContext);
context.subscriptions.push(lldbDebugAdapter);

const loggingDebugAdapter = registerLoggingDebugAdapterTracker();

// setup workspace context with initial workspace folders
Expand Down