private startConfiguredDebugSession()

in src/test-runner/run-tracker.ts [314:337]


  private startConfiguredDebugSession(): void {
    if (!this.debugInfo?.launchConfig || this.hasDebugSessionBeenInitiated) {
      return
    }
    this.hasDebugSessionBeenInitiated = true

    this.run.appendOutput(
      `Starting remote debug session [Launch config: '${this.debugInfo.launchConfig.name}']\r\n`
    )

    const debugConfig = {...this.debugInfo.launchConfig}
    if (this.debugInfo.localRoot && this.debugInfo.remoteRoot) {
      debugConfig.localRoot = this.debugInfo.localRoot
      debugConfig.remoteRoot = this.debugInfo.remoteRoot
      this.run.appendOutput(
        `Debug paths:\r\n  localRoot: ${debugConfig.localRoot}\r\n  remoteRoot: ${debugConfig.remoteRoot}\r\n`
      )
    }

    vscode.debug.startDebugging(
      vscode.workspace.workspaceFolders?.[0],
      debugConfig
    )
  }