Skip to content

Commit

Permalink
debug session: respect lifecycleManagedByParent
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn committed Aug 3, 2021
1 parent 3232379 commit 233466d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/vs/workbench/contrib/debug/browser/debugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ export class DebugSession implements IDebugSession {
}

this.cancelAllRequests();
if (this.raw) {
if (this._options.lifecycleManagedByParent && this.parentSession) {
await this.parentSession.terminate(restart);
} else if (this.raw) {
if (this.raw.capabilities.supportsTerminateRequest && this._configuration.resolved.request === 'launch') {
await this.raw.terminate(restart);
} else {
Expand All @@ -325,7 +327,9 @@ export class DebugSession implements IDebugSession {
}

this.cancelAllRequests();
if (this.raw) {
if (this._options.lifecycleManagedByParent && this.parentSession) {
await this.parentSession.disconnect(restart);
} else if (this.raw) {
await this.raw.disconnect({ restart, terminateDebuggee: false });
}

Expand All @@ -343,7 +347,11 @@ export class DebugSession implements IDebugSession {
}

this.cancelAllRequests();
await this.raw.restart({ arguments: this.configuration });
if (this._options.lifecycleManagedByParent && this.parentSession) {
await this.parentSession.restart();
} else {
await this.raw.restart({ arguments: this.configuration });
}
}

async sendBreakpoints(modelUri: URI, breakpointsToSend: IBreakpoint[], sourceModified: boolean): Promise<void> {
Expand Down

0 comments on commit 233466d

Please sign in to comment.