(exeNameOverride?: string)
| 349 | } |
| 350 | |
| 351 | private async restartSession(exeNameOverride?: string): Promise<void> { |
| 352 | this.logger.write("Restarting session..."); |
| 353 | await this.stop(); |
| 354 | |
| 355 | // Re-load the settings. |
| 356 | this.sessionSettings = getSettings(); |
| 357 | |
| 358 | if (exeNameOverride) { |
| 359 | // Reset the version and PowerShell details since we're launching a |
| 360 | // new executable. |
| 361 | this.logger.writeDebug( |
| 362 | `Starting with executable overriden to: ${exeNameOverride}`, |
| 363 | ); |
| 364 | this.sessionSettings.powerShellDefaultVersion = exeNameOverride; |
| 365 | this.versionDetails = undefined; |
| 366 | this.PowerShellExeDetails = undefined; |
| 367 | } |
| 368 | |
| 369 | await this.start(); |
| 370 | } |
| 371 | |
| 372 | /** In Development mode, write the PID to a file where the parent session can find it, to attach the dotnet debugger. */ |
| 373 | private async writePidIfInDevMode( |
no test coverage detected