From 3c22568a0b4478b592eb0b148c4b26ac4c0480eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E5=AE=87=E7=A5=A5?= Date: Mon, 19 Jun 2023 23:02:19 +0800 Subject: [PATCH] fix: use selected resource first --- integrations/vscode/extension.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/vscode/extension.js b/integrations/vscode/extension.js index 8a41617..1470ac1 100644 --- a/integrations/vscode/extension.js +++ b/integrations/vscode/extension.js @@ -69,10 +69,10 @@ module.exports = { context.subscriptions.push( vscode.commands.registerCommand( "ocamlearlybird.startDebug", - async () => { + async (resourceUri) => { try { log.info(`on:ocamlearlybird.startDebug`); - const uri = vscode.window.activeTextEditor.document.uri; + const uri = resourceUri ?? vscode.window.activeTextEditor.document.uri; const folder = vscode.workspace.getWorkspaceFolder(uri); if (!folder) { throw new Error(