mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-04 15:25:47 +01:00
enable EH debugging for multi root workspaces (workaround for #30698)
This commit is contained in:
@@ -10,8 +10,7 @@ import * as fs from 'fs';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import * as paths from 'vs/base/common/paths';
|
||||
import { OpenContext } from 'vs/platform/windows/common/windows';
|
||||
import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier } from "vs/platform/workspaces/common/workspaces";
|
||||
import { isParent } from "vs/platform/files/common/files";
|
||||
import { IWorkspaceIdentifier } from "vs/platform/workspaces/common/workspaces";
|
||||
|
||||
export interface ISimpleWindow {
|
||||
openedWorkspace?: IWorkspaceIdentifier;
|
||||
@@ -166,24 +165,4 @@ export function findExtensionDevelopmentWindow<W extends ISimpleWindow>(windows:
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export function findWindowOnWorkspaceOrFolder<W extends ISimpleWindow>(windows: W[], target: IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier): W {
|
||||
const directTargetMatch = windows.filter(w => {
|
||||
if (typeof target === 'string') {
|
||||
return paths.isEqual(target, w.openedFolderPath, !platform.isLinux /* ignorecase */);
|
||||
}
|
||||
|
||||
return w.openedWorkspace && w.openedWorkspace.id === target.id;
|
||||
});
|
||||
|
||||
const parentTargetMatch = windows.filter(w => {
|
||||
if (typeof target === 'string') {
|
||||
return isParent(target, w.openedFolderPath, !platform.isLinux /* ignorecase */);
|
||||
}
|
||||
|
||||
return false; // not supported for workspace target
|
||||
});
|
||||
|
||||
return directTargetMatch.length ? directTargetMatch[0] : parentTargetMatch[0]; // prefer direct match over parent match
|
||||
}
|
||||
Reference in New Issue
Block a user