@@ -968,9 +968,12 @@ export class TerminalService extends Disposable implements ITerminalService {
968968 // local terminal in a remote workspace as profile won't be used in those cases and these
969969 // terminals need to be launched before remote connections are established.
970970 const isLocalInRemoteTerminal = this . _remoteAgentService . getConnection ( ) && URI . isUri ( options ?. cwd ) && options ?. cwd . scheme === Schemas . vscodeFileResource ;
971+ this . _logService . debug ( `#terminalService#createTerminal: Value of isLocalInRemoteTerminal is: ${ isLocalInRemoteTerminal } ` ) ;
971972 if ( this . _terminalProfileService . availableProfiles . length === 0 ) {
973+ this . _logService . debug ( `#terminalService#createTerminal: available profile length is zero` ) ;
972974 const isPtyTerminal = options ?. config && 'customPtyImplementation' in options . config ;
973975 if ( ! isPtyTerminal && ! isLocalInRemoteTerminal ) {
976+ this . _logService . debug ( `#terminalService#createTerminal: !isPtyTerminal and !isLocalInRemoteTerminal` ) ;
974977 if ( this . _connectionState === TerminalConnectionState . Connecting ) {
975978 mark ( `code/terminal/willGetProfiles` ) ;
976979 }
@@ -982,20 +985,25 @@ export class TerminalService extends Disposable implements ITerminalService {
982985 }
983986
984987 let config = options ?. config ;
988+ this . _logService . debug ( `#terminalService#createTerminal: config ${ config } ` ) ;
985989 if ( ! config && isLocalInRemoteTerminal ) {
990+ this . _logService . debug ( `#terminalService#createTerminal: !config and isLocalInRemoteTerminal` ) ;
986991 const backend = await this . _terminalInstanceService . getBackend ( undefined ) ;
987992 const executable = await backend ?. getDefaultSystemShell ( ) ;
993+ this . _logService . debug ( `#terminalService#createTerminal: backend is: ${ backend } and executable is: ${ executable } ` ) ;
988994 if ( executable ) {
989995 config = { executable } ;
996+ this . _logService . debug ( `#terminalService#createTerminal: setting current config ${ config } to ${ executable } ` ) ;
990997 }
991998 }
992999
9931000 if ( ! config ) {
9941001 config = this . _terminalProfileService . getDefaultProfile ( ) ;
1002+ this . _logService . debug ( `#terminalService#createTerminal: !config, so set it to new value: ${ config } ` ) ;
9951003 }
9961004
9971005 const shellLaunchConfig = config && 'extensionIdentifier' in config ? { } : this . _terminalInstanceService . convertProfileToShellLaunchConfig ( config || { } ) ;
998-
1006+ this . _logService . debug ( `#terminalService#createTerminal: shellLaunchConfig is ${ shellLaunchConfig } ` ) ;
9991007 // Get the contributed profile if it was provided
10001008 const contributedProfile = options ?. skipContributedProfileCheck ? undefined : await this . _getContributedProfile ( shellLaunchConfig , options ) ;
10011009
0 commit comments