Skip to content

Commit 4bf3b6a

Browse files
Focus current file before debugging (#147)
* Focus current file before debugging * fix lint
1 parent 4718b3b commit 4bf3b6a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/extension/extensionInit.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ export async function registerDebugger(context: IExtensionContext): Promise<void
8989
executeCommand('workbench.action.debug.selectandstart');
9090
} else {
9191
await executeCommand('debug.addConfiguration');
92-
executeCommand('workbench.action.debug.start');
92+
if (file) await window.showTextDocument(file);
93+
executeCommand('workbench.action.debug.start', file?.toString());
9394
}
9495
}),
9596
);

0 commit comments

Comments
 (0)