support env vars when creating a DA; fixes #56646

This commit is contained in:
Andre Weinand
2018-09-16 01:14:19 +02:00
parent 3193667fc4
commit be713f752c
6 changed files with 64 additions and 23 deletions

View File

@@ -347,7 +347,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
mythis._debugServiceProxy.$acceptDAMessage(handle, message);
}
}(adapter.port);
}(adapter);
break;
case 'executable':
@@ -363,7 +363,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
mythis._debugServiceProxy.$acceptDAMessage(handle, message);
}
}(config.type, adapter);
}(adapter, config.type);
break;
default:

View File

@@ -1892,19 +1892,25 @@ export class DebugAdapterExecutable implements vscode.DebugAdapterExecutable {
readonly type = 'executable';
readonly command: string;
readonly args: string[];
readonly env?: { [key: string]: string };
readonly cwd?: string;
constructor(command: string, args?: string[]) {
constructor(command: string, args?: string[], env?: { [key: string]: string }, cwd?: string) {
this.command = command;
this.args = args;
this.env = env;
this.cwd = cwd;
}
}
export class DebugAdapterServer implements vscode.DebugAdapterServer {
readonly type = 'server';
readonly port: number;
readonly host: string;
constructor(port: number) {
constructor(port: number, host?: string) {
this.port = port;
this.host = host;
}
}