(
launcher: ILauncher,
params: AnyLaunchConfiguration,
cancellationToken: CancellationToken,
)
| 258 | } |
| 259 | |
| 260 | async _launch( |
| 261 | launcher: ILauncher, |
| 262 | params: AnyLaunchConfiguration, |
| 263 | cancellationToken: CancellationToken, |
| 264 | ): Promise<void> { |
| 265 | const result = await this.captureLaunch(launcher, params, cancellationToken); |
| 266 | if (!result.blockSessionTermination) { |
| 267 | return; |
| 268 | } |
| 269 | |
| 270 | ++this._terminationCount; |
| 271 | |
| 272 | const listener = launcher.onTerminated(result => { |
| 273 | listener.dispose(); |
| 274 | this._detachOrphanThreads(this.targetList(), { restart: result.restart }); |
| 275 | --this._terminationCount; |
| 276 | this._onTargetListChangedEmitter.fire(); |
| 277 | if (!this._terminationCount) { |
| 278 | this._dap.then(dap => dap.terminated({ restart: result.restart })); |
| 279 | } |
| 280 | }); |
| 281 | |
| 282 | this._disposables.push(listener); |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * Launches the debug target, returning any the resolved result. Does a |
no test coverage detected