VSCode with codespace: set local terminal profile - visual-studio-code

I'm working on a project in a codespace but when I start a local integrated terminal within that session it defaults to PowerShell, not git-bash as is selected when I work completely local.
Does anyone know where to find the relevant setting to prevent this?
The dropdown in the terminal area only relates to the remote terminal session. I've also searched settings for terminal related items, but I'm not seeing anything clearly related to local terminal.

Related

How to make cmd the default terminal that gets opened in VSCode on opening VS Code.?

When I open my VSCode the default terminal that gets opened is PowerShell. I wants the default one that gets opened to be CMD. How can I change it?
I have configured the Terminal: Select Default Profile to be CMD and its also made sure as seen in the below pic.
I restarted the VSCode several times, still on opening VS Code the terminal that gets opened is PowerShell. Should I make any changes to settings.json?

Is there a way to sync the settings between local and remote for vscode?

So the latest version of vscode (1.46) provides preference sync, but I found I cannot enable this feature for remote vscode. Whenever I open remote folder, (e.g., in wsl), the option to sign in MS account and turn on preference sync is missing. Did I miss anything here or it is not supported?
figure below shows my local vscode instance with the preference sync:
figure below shows my vscode instance for remote (wsl) without the preference sync option:
https://code.visualstudio.com/docs/editor/settings-sync
I was looking to enable this too, the first line is the answer I think. Only available for vscode insiders at the moment, maybe wait 'til next month

How do i open a local terminal from a remote session in VScode?

When i open my workspace in VScode i go directly into my SSH work area, which is what i want. But i want to have a split terminal with access to both my SSH-work area and a terminal for my local computer, but i cant access the local one without making an explicitly new terminal from the dropdown window. And if i try to split the new local terminal i get the error "The terminal shell CWD "/Users/asd/work/" does not exist" as if its being looked for in my SSH work directory. Is there any way of specifying the default terminal to be on my local computer? If i do so in the terminal preferences in VScode i get the CWD-error on startup instead.
This should have been resolved with microsoft/vscode-remote-release issue 1479
Both of you don't have C:\Windows\System32 on your path, I don't understand why that is.
But I will change this to not rely on the PATH.
Even if this was for Windows originally, opening a local shell, (Mac or Windows) should now be possible while having a remote session.
Wtih ctrl+shift+p or cmd+shift+p(Command Palette), you have:
Terminal: Create New Integrated Terminal (local)
Bonus, with VSCode 1.53 (Jan. 2021), there is now:
Remote layout persistence
Terminal layout is restored on remote terminal reconnection. In the video below, the terminal layout is restored when reloading VS Code and reconnecting to a Windows Subsystem for Linux (WSL) remote instance.

vscode automatically "source activate" everytime launches new terminal

Recently when I'm using vscode, everytime I launches the built-in terminal, it automatically uses "source activate base" to launch a anaconda python virtual environment. You can see the screenshot
I don't think I changed anything but it just came up randomly. Can someone help me out?
To prevent automatic activation of a selected environment, add
"python.terminal.activateEnvironment": false
to your settings.json file (it can be placed anywhere as a sibling to the existing settings). However, debugging or running Python code without any activated environment won't work.

Prevent integrated terminal from opening automatically

Whenever I open a PowerShell script in VS Code, the integrated terminal opens. How can we prevent the integrated terminal from opening automatically. I have searched the settings for "terminal" and have found nothing associated with auto-start.
VSCode will remember your last session.
So, if you close the terminal and exit VSCode, the next time you open, the terminal will not be displayed.
You can set your VSCode profile to not display (close the terminal on load).
As for User Settings:
This is not the first time this has been asked for.
https://github.com/PowerShell/vscode-powershell/issues/580
powershell.startAutomatically: When set to true (default), causes the
language service to start automatically the first time a PowerShell
file is opened. You could then use the "Restart PowerShell Session"
command to kick off the language service on demand. •
powershell.showIntegratedConsoleOnStartup: When set to true (default),
causes the integrated console window to be shown automatically when
the language service starts. If false, the language service starts but
the console window isn't shown until the user runs script code (or
runs the Show Integrated Console command)
Update as per the OP side discussion with me
What I just tested.
In your custom user settings, either set the:
"powershell.enableProfileLoading": false
or if you have that setting this way:
"powershell.enableProfileLoading": true
Add this setting:
"powershell.integratedConsole.showOnStartup": false,
What Worked
"powershell.integratedConsole.showOnStartup": false
If the setting isn't there yet, then simply add it.
What Almost Worked
Setting "powershell.startAutomatically": false also kills the entire PowerShell extension.
Relying on VSCode to remember the last session's setup works inconsistently; for instance, it does not work when loading a file directly from a terminal with $ code someFile.psm1.
I believe the setting is:
"terminal.integrated.enablePersistentSessions": false
regardless of Powershell or other types of terminals. This should be self-explanatory.
My VSCode v1.65.2
File->Preferences->Settings
In the Search settings input field:
Type the word-> terminal
Under Extensions:
Click-> Remote-SSH
Uncheck-> Always reveal the SSH login Terminal.
Close all VSCode windows and restart VSCode.
Open the remote SSH location and the integrated terminal should no longer open automatically.