Skip to content

Commit 186bacc

Browse files
committed
correct workspace path for mutiroot scenarios no-config debugging
1 parent 13bf88f commit 186bacc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/extension/noConfigDebugInit.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ export async function registerNoConfigDebug(
3737

3838
// create a temp directory for the noConfigDebugAdapterEndpoints
3939
// file path format: extPath/.noConfigDebugAdapterEndpoints/endpoint-stableWorkspaceHash.txt
40-
const workspaceUri = workspace.workspaceFolders?.[0]?.uri;
40+
let workspaceUri = workspace.workspaceFile?.fsPath;
41+
if (!workspaceUri) {
42+
workspaceUri = workspace.workspaceFolders?.map((e) => e.uri.fsPath).join(';');
43+
}
4144
if (!workspaceUri) {
4245
traceError('No workspace folder found');
4346
return Promise.resolve(new Disposable(() => {}));

0 commit comments

Comments
 (0)