about summary refs log tree commit diff
path: root/editors/code/src/debug.ts
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2023-07-24 12:21:34 +0300
committerLaurențiu Nicola <lnicola@dend.ro>2023-07-24 12:21:34 +0300
commit0155385b576523194c06e3ec164c8c0691f331e0 (patch)
tree6f899011b016046e5c10a5028d9191acdc9e956c /editors/code/src/debug.ts
parent4704881b641884de50645637108b6b6f5b68aaf9 (diff)
downloadrust-0155385b576523194c06e3ec164c8c0691f331e0.tar.gz
rust-0155385b576523194c06e3ec164c8c0691f331e0.zip
Merge commit '99718d0c8bc5aadd993acdcabc1778fc7b5cc572' into sync-from-ra
Diffstat (limited to 'editors/code/src/debug.ts')
-rw-r--r--editors/code/src/debug.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts
index f3d6238d51b..e817d680eae 100644
--- a/editors/code/src/debug.ts
+++ b/editors/code/src/debug.ts
@@ -66,6 +66,12 @@ export async function startDebugSession(ctx: Ctx, runnable: ra.Runnable): Promis
     return vscode.debug.startDebugging(undefined, debugConfig);
 }
 
+function createCommandLink(extensionId: string): string {
+    // do not remove the second quotes inside
+    // encodeURIComponent or it won't work
+    return `extension.open?${encodeURIComponent(`"${extensionId}"`)}`;
+}
+
 async function getDebugConfiguration(
     ctx: Ctx,
     runnable: ra.Runnable,
@@ -90,9 +96,12 @@ async function getDebugConfiguration(
     }
 
     if (!debugEngine) {
+        const commandCodeLLDB: string = createCommandLink("vadimcn.vscode-lldb");
+        const commandCpp: string = createCommandLink("ms-vscode.cpptools");
+
         await vscode.window.showErrorMessage(
-            `Install [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb)` +
-                ` or [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) extension for debugging.`,
+            `Install [CodeLLDB](command:${commandCodeLLDB} "Open CodeLLDB")` +
+                ` or [C/C++](command:${commandCpp} "Open C/C++") extension for debugging.`,
         );
         return;
     }