Merge from vscode cfc1ab4c5f816765b91fb7ead3c3427a7c8581a3

This commit is contained in:
ADS Merger
2020-03-11 04:19:23 +00:00
parent 16fab722d5
commit 4c3e48773d
880 changed files with 20441 additions and 11232 deletions

View File

@@ -270,7 +270,7 @@ export class RawDebugSession implements IDisposable {
if (this.capabilities.supportsTerminateRequest) {
if (!this.terminated) {
this.terminated = true;
return this.send('terminate', { restart }, undefined, 500);
return this.send('terminate', { restart }, undefined, 1000);
}
return this.disconnect(restart);
}
@@ -481,7 +481,7 @@ export class RawDebugSession implements IDisposable {
this.inShutdown = true;
if (this.debugAdapter) {
try {
await this.send('disconnect', { restart }, undefined, 500);
await this.send('disconnect', { restart }, undefined, 1000);
} finally {
this.stopAdapter(error);
}
@@ -601,9 +601,15 @@ export class RawDebugSession implements IDisposable {
private send<R extends DebugProtocol.Response>(command: string, args: any, token?: CancellationToken, timeout?: number): Promise<R> {
return new Promise<DebugProtocol.Response>((completeDispatch, errorDispatch) => {
if (!this.debugAdapter) {
errorDispatch(new Error(nls.localize('noDebugAdapter', "No debug adapter found. Can not send '{0}'.", command)));
if (this.inShutdown) {
// We are in shutdown silently complete
completeDispatch();
} else {
errorDispatch(new Error(nls.localize('noDebugAdapter', "No debug adapter found. Can not send '{0}'.", command)));
}
return;
}
let cancelationListener: IDisposable;
const requestId = this.debugAdapter.sendRequest(command, args, (response: DebugProtocol.Response) => {
if (cancelationListener) {