| 543 | } |
| 544 | |
| 545 | createThread(cdp: Cdp.Api, target: ITarget): Thread { |
| 546 | this._thread = new Thread( |
| 547 | this.sourceContainer, |
| 548 | cdp, |
| 549 | this.dap, |
| 550 | target, |
| 551 | this._services.get(IRenameProvider), |
| 552 | this._services.get(ILogger), |
| 553 | this._services.get(IEvaluator), |
| 554 | this._services.get(ICompletions), |
| 555 | this.launchConfig, |
| 556 | this.breakpointManager, |
| 557 | this._services.get(IConsole), |
| 558 | this._services.get(IExceptionPauseService), |
| 559 | this._services.get(SmartStepper), |
| 560 | this._services.get(IShutdownParticipants), |
| 561 | this._services.get(IClientCapabilies), |
| 562 | ); |
| 563 | |
| 564 | const profile = this._services.get<IProfileController>(IProfileController); |
| 565 | profile.connect(this.dap, this._thread); |
| 566 | if ('profileStartup' in this.launchConfig && this.launchConfig.profileStartup) { |
| 567 | profile.start(this.dap, this._thread, { type: BasicCpuProfiler.type }); |
| 568 | } |
| 569 | |
| 570 | this._thread.updateCustomBreakpoints(this._xhrBreakpoints, this._customBreakpoints); |
| 571 | |
| 572 | this.asyncStackPolicy |
| 573 | .connect(cdp) |
| 574 | .then(d => this._disposables.push(d)) |
| 575 | .catch(err => |
| 576 | this._services |
| 577 | .get<ILogger>(ILogger) |
| 578 | .error(LogTag.Internal, 'Error enabling async stacks', err) |
| 579 | ); |
| 580 | |
| 581 | this.breakpointManager.setThread(this._thread); |
| 582 | this._services.get(DiagnosticToolSuggester).attach(cdp); |
| 583 | this._threadDeferred.resolve(this._thread); |
| 584 | |
| 585 | return this._thread; |
| 586 | } |
| 587 | |
| 588 | async setCustomBreakpoints({ |
| 589 | ids, |