aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/debug.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/debug.ts')
-rw-r--r--editors/code/src/debug.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts
index 925126a16..3889a2773 100644
--- a/editors/code/src/debug.ts
+++ b/editors/code/src/debug.ts
@@ -77,7 +77,7 @@ async function getDebugConfiguration(ctx: Ctx, runnable: ra.Runnable): Promise<v
77 } 77 }
78 78
79 if (!debugEngine) { 79 if (!debugEngine) {
80 vscode.window.showErrorMessage(`Install [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb)` 80 await vscode.window.showErrorMessage(`Install [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb)`
81 + ` or [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) extension for debugging.`); 81 + ` or [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) extension for debugging.`);
82 return; 82 return;
83 } 83 }
@@ -86,12 +86,14 @@ async function getDebugConfiguration(ctx: Ctx, runnable: ra.Runnable): Promise<v
86 if (ctx.config.debug.openDebugPane) { 86 if (ctx.config.debug.openDebugPane) {
87 debugOutput.show(true); 87 debugOutput.show(true);
88 } 88 }
89 89 // folder exists or RA is not active.
90 const isMultiFolderWorkspace = vscode.workspace.workspaceFolders!.length > 1; 90 // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
91 const firstWorkspace = vscode.workspace.workspaceFolders![0]; // folder exists or RA is not active. 91 const workspaceFolders = vscode.workspace.workspaceFolders!;
92 const isMultiFolderWorkspace = workspaceFolders.length > 1;
93 const firstWorkspace = workspaceFolders[0];
92 const workspace = !isMultiFolderWorkspace || !runnable.args.workspaceRoot ? 94 const workspace = !isMultiFolderWorkspace || !runnable.args.workspaceRoot ?
93 firstWorkspace : 95 firstWorkspace :
94 vscode.workspace.workspaceFolders!.find(w => runnable.args.workspaceRoot?.includes(w.uri.fsPath)) || firstWorkspace; 96 workspaceFolders.find(w => runnable.args.workspaceRoot?.includes(w.uri.fsPath)) || firstWorkspace;
95 97
96 const wsFolder = path.normalize(workspace.uri.fsPath); 98 const wsFolder = path.normalize(workspace.uri.fsPath);
97 const workspaceQualifier = isMultiFolderWorkspace ? `:${workspace.name}` : ''; 99 const workspaceQualifier = isMultiFolderWorkspace ? `:${workspace.name}` : '';