@@ -88,7 +88,7 @@ export class SessionManager implements Middleware {
8888 private editorServicesArgs : string ;
8989 private sessionStatus : SessionStatus = SessionStatus . NeverStarted ;
9090 private suppressRestartPrompt : boolean ;
91- private focusConsoleOnExecute : boolean ;
91+ private focusTerminalOnExecute : boolean ;
9292 private platformDetails : IPlatformDetails ;
9393 private languageClientConsumers : LanguageClientConsumer [ ] = [ ] ;
9494 private languageStatusItem : vscode . LanguageStatusItem ;
@@ -188,7 +188,7 @@ export class SessionManager implements Middleware {
188188 this . platformDetails ,
189189 this . sessionSettings . powerShellAdditionalExePaths ) ;
190190
191- this . focusConsoleOnExecute = this . sessionSettings . integratedConsole . focusConsoleOnExecute ;
191+ this . focusTerminalOnExecute = this . sessionSettings . integratedConsole . focusConsoleOnExecute ;
192192
193193 this . createStatusBarItem ( ) ;
194194
@@ -482,7 +482,7 @@ Type 'help' to get help.
482482 private async onConfigurationUpdated ( ) {
483483 const settings = Settings . load ( ) ;
484484
485- this . focusConsoleOnExecute = settings . integratedConsole . focusConsoleOnExecute ;
485+ this . focusTerminalOnExecute = settings . integratedConsole . focusConsoleOnExecute ;
486486
487487 // Detect any setting changes that would affect the session
488488 if ( ! this . suppressRestartPrompt &&
@@ -508,7 +508,7 @@ Type 'help' to get help.
508508 vscode . commands . registerCommand ( this . ShowSessionMenuCommandName , async ( ) => { await this . showSessionMenu ( ) ; } ) ,
509509 vscode . workspace . onDidChangeConfiguration ( async ( ) => { await this . onConfigurationUpdated ( ) ; } ) ,
510510 vscode . commands . registerCommand (
511- "PowerShell.ShowSessionConsole" , ( isExecute ?: boolean ) => { this . showSessionConsole ( isExecute ) ; } ) ,
511+ "PowerShell.ShowSessionConsole" , ( isExecute ?: boolean ) => { this . showSessionTerminal ( isExecute ) ; } ) ,
512512 vscode . commands . registerCommand (
513513 "PowerShell.WalkthroughTelemetry" , ( satisfaction : number ) => {
514514 this . sendTelemetryEvent ( "powershellWalkthroughSatisfaction" , null , { level : satisfaction } ) ;
@@ -795,12 +795,20 @@ Type 'help' to get help.
795795 await this . restartSession ( exePath . displayName ) ;
796796 }
797797
798- private showSessionConsole ( isExecute ?: boolean ) {
799- if ( this . languageServerProcess ) {
800- this . languageServerProcess . showConsole ( isExecute && ! this . focusConsoleOnExecute ) ;
798+ // Shows the temp debug terminal if it exists, otherwise the session terminal.
799+ public showDebugTerminal ( isExecute ?: boolean ) {
800+ if ( this . debugSessionProcess ) {
801+ this . debugSessionProcess . showTerminal ( isExecute && ! this . focusTerminalOnExecute ) ;
802+ } else {
803+ this . languageServerProcess ?. showTerminal ( isExecute && ! this . focusTerminalOnExecute )
801804 }
802805 }
803806
807+ // Always shows the session terminal.
808+ public showSessionTerminal ( isExecute ?: boolean ) {
809+ this . languageServerProcess ?. showTerminal ( isExecute && ! this . focusTerminalOnExecute ) ;
810+ }
811+
804812 private async showSessionMenu ( ) {
805813 const availablePowerShellExes = await this . powershellExeFinder . getAllAvailablePowerShellInstallations ( ) ;
806814
0 commit comments