(cdp: Cdp.Api, delegate: IThreadDelegate)
| 253 | } |
| 254 | |
| 255 | createThread(cdp: Cdp.Api, delegate: IThreadDelegate): Thread { |
| 256 | this._thread = new Thread( |
| 257 | this.sourceContainer, |
| 258 | cdp, |
| 259 | this.dap, |
| 260 | delegate, |
| 261 | this._services.get(ILogger), |
| 262 | this._services.get(IEvaluator), |
| 263 | this._services.get(ICompletions), |
| 264 | this.launchConfig, |
| 265 | this.breakpointManager, |
| 266 | ); |
| 267 | |
| 268 | const profile = this._services.get<IProfileController>(IProfileController); |
| 269 | profile.connect(this.dap, this._thread); |
| 270 | if ('profileStartup' in this.launchConfig && this.launchConfig.profileStartup) { |
| 271 | profile.start(this.dap, this._thread, { type: BasicCpuProfiler.type }); |
| 272 | } |
| 273 | |
| 274 | for (const breakpoint of this._customBreakpoints) |
| 275 | this._thread.updateCustomBreakpoint(breakpoint, true); |
| 276 | |
| 277 | this.asyncStackPolicy |
| 278 | .connect(cdp) |
| 279 | .then(d => this._disposables.push(d)) |
| 280 | .catch(err => |
| 281 | this._services |
| 282 | .get<ILogger>(ILogger) |
| 283 | .error(LogTag.Internal, 'Error enabling async stacks', err), |
| 284 | ); |
| 285 | |
| 286 | this._thread.setPauseOnExceptionsState(this._pauseOnExceptionsState); |
| 287 | this.breakpointManager.setThread(this._thread); |
| 288 | return this._thread; |
| 289 | } |
| 290 | |
| 291 | async enableCustomBreakpoints( |
| 292 | params: Dap.EnableCustomBreakpointsParams, |
no test coverage detected