diff --git a/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts b/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts index a400dde3bd5f93d0e726627d2cd2f7e35981c4ac..720ed115418d37b43bd66b43156a3774a6d5615f 100644 --- a/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts +++ b/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts @@ -281,7 +281,7 @@ export class RawDebugSession implements IDisposable { if (this.capabilities.supportsTerminateRequest) { if (!this.terminated) { this.terminated = true; - return this.send('terminate', { restart }, undefined, 1000); + return this.send('terminate', { restart }, undefined, 2000); } return this.disconnect(restart); } @@ -499,7 +499,9 @@ export class RawDebugSession implements IDisposable { this.inShutdown = true; if (this.debugAdapter) { try { - await this.send('disconnect', { restart }, undefined, 1000); + await this.send('disconnect', { restart }, undefined, 2000); + } catch (e) { + // Catch the potential 'disconnect' error - no need to show it to the user since the adapter is shutting down } finally { this.stopAdapter(error); } diff --git a/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.ts b/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.ts index 93a76d52c1efc247009bfddbd070ec63973a287c..8b5ab068ee33a455646d950e9d0c36f97c5c1775 100644 --- a/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.ts +++ b/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.ts @@ -6,6 +6,7 @@ import { Emitter, Event } from 'vs/base/common/event'; import { IDebugAdapter } from 'vs/workbench/contrib/debug/common/debug'; import { timeout } from 'vs/base/common/async'; +import { localize } from 'vs/nls'; /** * Abstract implementation of the low level API for a debug adapter. @@ -88,7 +89,7 @@ export abstract class AbstractDebugAdapter implements IDebugAdapter { request_seq: request.seq, success: false, command, - message: `timeout after ${timeout} ms` + message: localize('timeout', "Timeout after {0} ms for '{1}'", timeout, command) }; clb(err); }