@@ -88,7 +88,7 @@ export class SessionManager implements Middleware {
88
88
private editorServicesArgs : string ;
89
89
private sessionStatus : SessionStatus = SessionStatus . NeverStarted ;
90
90
private suppressRestartPrompt : boolean ;
91
- private focusConsoleOnExecute : boolean ;
91
+ private focusTerminalOnExecute : boolean ;
92
92
private platformDetails : IPlatformDetails ;
93
93
private languageClientConsumers : LanguageClientConsumer [ ] = [ ] ;
94
94
private languageStatusItem : vscode . LanguageStatusItem ;
@@ -188,7 +188,7 @@ export class SessionManager implements Middleware {
188
188
this . platformDetails ,
189
189
this . sessionSettings . powerShellAdditionalExePaths ) ;
190
190
191
- this . focusConsoleOnExecute = this . sessionSettings . integratedConsole . focusConsoleOnExecute ;
191
+ this . focusTerminalOnExecute = this . sessionSettings . integratedConsole . focusConsoleOnExecute ;
192
192
193
193
this . createStatusBarItem ( ) ;
194
194
@@ -482,7 +482,7 @@ Type 'help' to get help.
482
482
private async onConfigurationUpdated ( ) {
483
483
const settings = Settings . load ( ) ;
484
484
485
- this . focusConsoleOnExecute = settings . integratedConsole . focusConsoleOnExecute ;
485
+ this . focusTerminalOnExecute = settings . integratedConsole . focusConsoleOnExecute ;
486
486
487
487
// Detect any setting changes that would affect the session
488
488
if ( ! this . suppressRestartPrompt &&
@@ -508,7 +508,7 @@ Type 'help' to get help.
508
508
vscode . commands . registerCommand ( this . ShowSessionMenuCommandName , async ( ) => { await this . showSessionMenu ( ) ; } ) ,
509
509
vscode . workspace . onDidChangeConfiguration ( async ( ) => { await this . onConfigurationUpdated ( ) ; } ) ,
510
510
vscode . commands . registerCommand (
511
- "PowerShell.ShowSessionConsole" , ( isExecute ?: boolean ) => { this . showSessionConsole ( isExecute ) ; } ) ,
511
+ "PowerShell.ShowSessionConsole" , ( isExecute ?: boolean ) => { this . showSessionTerminal ( isExecute ) ; } ) ,
512
512
vscode . commands . registerCommand (
513
513
"PowerShell.WalkthroughTelemetry" , ( satisfaction : number ) => {
514
514
this . sendTelemetryEvent ( "powershellWalkthroughSatisfaction" , null , { level : satisfaction } ) ;
@@ -795,12 +795,20 @@ Type 'help' to get help.
795
795
await this . restartSession ( exePath . displayName ) ;
796
796
}
797
797
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 )
801
804
}
802
805
}
803
806
807
+ // Always shows the session terminal.
808
+ public showSessionTerminal ( isExecute ?: boolean ) {
809
+ this . languageServerProcess ?. showTerminal ( isExecute && ! this . focusTerminalOnExecute ) ;
810
+ }
811
+
804
812
private async showSessionMenu ( ) {
805
813
const availablePowerShellExes = await this . powershellExeFinder . getAllAvailablePowerShellInstallations ( ) ;
806
814
0 commit comments