Skip to content

Commit

Permalink
resolveExtensionHostDebugEnvironment: give precedence to payload
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Jul 14, 2021
1 parent 03e6bf8 commit 5b5f381
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/vs/workbench/services/environment/browser/environmentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,6 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
extensionDevelopmentLocationURI: undefined,
extensionDevelopmentKind: undefined
};
const developmentOptions = this.options.developmentOptions;
if (developmentOptions) {
if (developmentOptions.extensions?.length) {
extensionHostDebugEnvironment.extensionDevelopmentLocationURI = developmentOptions.extensions.map(e => URI.revive(e));
extensionHostDebugEnvironment.isExtensionDevelopment = true;
}
if (developmentOptions) {
extensionHostDebugEnvironment.extensionTestsLocationURI = URI.revive(developmentOptions.extensionTestsPath);
}
}

// Fill in selected extra environmental properties
if (this.payload) {
Expand Down Expand Up @@ -324,6 +314,17 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
}
}

const developmentOptions = this.options.developmentOptions;
if (developmentOptions && !extensionHostDebugEnvironment.isExtensionDevelopment) {
if (developmentOptions.extensions?.length) {
extensionHostDebugEnvironment.extensionDevelopmentLocationURI = developmentOptions.extensions.map(e => URI.revive(e));
extensionHostDebugEnvironment.isExtensionDevelopment = true;
}
if (developmentOptions.extensionTestsPath) {
extensionHostDebugEnvironment.extensionTestsLocationURI = URI.revive(developmentOptions.extensionTestsPath);
}
}

return extensionHostDebugEnvironment;
}
}

0 comments on commit 5b5f381

Please sign in to comment.