Skip to content

Commit

Permalink
improve EH detection
Browse files Browse the repository at this point in the history
  • Loading branch information
weinand committed Jun 13, 2018
1 parent daaf84f commit 7ba2769
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/vs/workbench/parts/debug/node/debugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,13 @@ export class Debugger {
}

public substituteVariables(folder: IWorkspaceFolder, config: IConfig): TPromise<IConfig> {

// first try to substitute variables in EH
return (this.inEH() ? this.configurationManager.substituteVariables(this.type, folder, config) : TPromise.as(config)).then(config => {

if (this.inEH()) {
return this.configurationManager.substituteVariables(this.type, folder, config).then(config => {
return this.configurationResolverService.resolveWithCommands(folder, config, this.variables);
});
} else {
return this.configurationResolverService.resolveWithCommands(folder, config, this.variables);
});
}
}

public runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments): TPromise<void> {
Expand All @@ -88,7 +89,7 @@ export class Debugger {

private inEH(): boolean {
const debugConfigs = this.configurationService.getValue<IDebugConfiguration>('debug');
return debugConfigs.extensionHostDebugAdapter;
return debugConfigs.extensionHostDebugAdapter || this.extensionDescription.extensionLocation.scheme !== 'file';
}

public get label(): string {
Expand Down

0 comments on commit 7ba2769

Please sign in to comment.