提交 222eb56a 编写于 作者: I isidor

debug: second click on stop session force kills the server

fixes #1225
上级 dd3ee5a5
......@@ -197,7 +197,7 @@ export interface IRawAdapter extends IRawEnvAdapter {
export interface IRawDebugSession extends ee.EventEmitter {
getType(): string;
isAttach: boolean;
disconnect(restart?: boolean): TPromise<DebugProtocol.DisconnectResponse>;
disconnect(restart?: boolean, force?: boolean): TPromise<DebugProtocol.DisconnectResponse>;
next(args: DebugProtocol.NextArguments): TPromise<DebugProtocol.NextResponse>;
stepIn(args: DebugProtocol.StepInArguments): TPromise<DebugProtocol.StepInResponse>;
......
......@@ -213,7 +213,7 @@ export class StopDebugAction extends AbstractDebugAction {
public run(): Promise {
var session = this.debugService.getActiveSession();
return session ? session.disconnect() : Promise.as(null);
return session ? session.disconnect(false, true) : Promise.as(null);
}
protected isEnabled(): boolean {
......
......@@ -114,7 +114,11 @@ export class RawDebugSession extends v8.V8Protocol implements debug.IRawDebugSes
return this.send('pause', args);
}
public disconnect(restart = false): TPromise<DebugProtocol.DisconnectResponse> {
public disconnect(restart = false, force = false): TPromise<DebugProtocol.DisconnectResponse> {
if (this.stopServerPending && force) {
return this.stopServer();
}
if ((this.serverProcess || this.socket) && !this.stopServerPending) {
// point of no return: from now on don't report any errors
this.stopServerPending = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册