mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-04 15:25:47 +01:00
support debuging more than one extension; fixes #71081
This commit is contained in:
@@ -1153,7 +1153,7 @@ export class WindowsManager implements IWindowsMainService {
|
||||
return { openFolderInNewWindow: !!openFolderInNewWindow, openFilesInNewWindow };
|
||||
}
|
||||
|
||||
openExtensionDevelopmentHostWindow(extensionDevelopmentPath: string, openConfig: IOpenConfiguration): void {
|
||||
openExtensionDevelopmentHostWindow(extensionDevelopmentPath: string | string[], openConfig: IOpenConfiguration): void {
|
||||
|
||||
// Reload an existing extension development host window on the same path
|
||||
// We currently do not allow more than one extension development window
|
||||
@@ -1207,9 +1207,30 @@ export class WindowsManager implements IWindowsMainService {
|
||||
openConfig.cli['folder-uri'] = folderUris;
|
||||
openConfig.cli['file-uri'] = fileUris;
|
||||
|
||||
const match = extensionDevelopmentPath.match(/^vscode-remote:\/\/([^\/]+)/);
|
||||
if (match) {
|
||||
openConfig.cli['remote'] = URI.parse(extensionDevelopmentPath).authority;
|
||||
if (Array.isArray(extensionDevelopmentPath)) {
|
||||
let authority: string | undefined = undefined;
|
||||
for (let p of extensionDevelopmentPath) {
|
||||
const match = p.match(/^vscode-remote:\/\/([^\/]+)/);
|
||||
if (match) {
|
||||
const auth = URI.parse(p).authority;
|
||||
if (authority) {
|
||||
if (auth !== authority) {
|
||||
console.log('more than one authority');
|
||||
}
|
||||
} else {
|
||||
authority = auth;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (authority) {
|
||||
openConfig.cli['remote'] = authority;
|
||||
}
|
||||
|
||||
} else {
|
||||
const match = extensionDevelopmentPath.match(/^vscode-remote:\/\/([^\/]+)/);
|
||||
if (match) {
|
||||
openConfig.cli['remote'] = URI.parse(extensionDevelopmentPath).authority;
|
||||
}
|
||||
}
|
||||
|
||||
// Open it
|
||||
|
||||
Reference in New Issue
Block a user