(params: AnyLaunchConfiguration, dap: Dap.Api)
| 230 | } |
| 231 | |
| 232 | private async _boot(params: AnyLaunchConfiguration, dap: Dap.Api) { |
| 233 | warnNightly(dap); |
| 234 | this.reportBootTelemetry(params); |
| 235 | provideLaunchParams(this._rootServices, params, dap); |
| 236 | this._rootServices.get<ILogger>(ILogger).setup(resolveLoggerOptions(dap, params.trace)); |
| 237 | |
| 238 | const cts = params.timeout > 0 |
| 239 | ? CancellationTokenSource.withTimeout(params.timeout) |
| 240 | : new CancellationTokenSource(); |
| 241 | |
| 242 | if (params.rootPath) params.rootPath = urlUtils.platformPathToPreferredCase(params.rootPath); |
| 243 | this._launchParams = params; |
| 244 | |
| 245 | const boots = await Promise.all( |
| 246 | [...this.getLaunchers()].map(l => this._launch(l, params, cts.token)), |
| 247 | ); |
| 248 | |
| 249 | Promise.all(boots.map(b => b.terminated)).then(allMetadata => { |
| 250 | const metadata = allMetadata.find(truthy); |
| 251 | this._markTargetAsTerminated(this._root, { restart: !!metadata?.restart }); |
| 252 | }); |
| 253 | |
| 254 | return {}; |
| 255 | } |
| 256 | |
| 257 | private reportBootTelemetry(rawParams: AnyLaunchConfiguration) { |
| 258 | const defaults = applyDefaults({ |
no test coverage detected