问题
All in title. Also i'm russian and this is Google Translate. I opened the process in Task Manager and went to the file location. There was an error with access denial, but it was solved with the help of Computer Control. But I don't know how to open this particular terminal in vs code. I introduced OpenConsole first.Yes, but it was only a terminal. But that's what I'm interested in.
SCREENSHOT
回答1:
I think you want to launch the new Windows Terminal from within VS Code.
What you need to do is edit your USER settings.json, and locate the line that associates an editor with the integrated Windows terminal (there are three built-in editors that you can redefine:
- Windows (
cmdorPowerShell) - Windows Subsystem for Linux (
wsl) - Linux (
xterm)
):
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
If you REPLACE this by:
"terminal.integrated.shell.windows": "C:\\Users\\<your_user_name>\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe",
... then your Windows Terminal will pop up rather than the cmd integrated console. But it will be in a separate window (not in the VS Code pane); I am not aware of any method on how to start Windows Terminal in integrated mode...
If it is however your intention to replace the usual cmd terminal by a PowerShell, then you can follow the instructions from Fran6.
A more graphical method is go to your existing VS Code terminal, and go to the drop down to select one of multiple terminals you might have launched. Below your existing terminals, there is an option to 'Select Default Shell':
When you select this option, this will take you straight to the options available to change to your preferred integrated shell:
When you now hit the + next to the dropdown, you can accumulate as many shells as you want, of any type that you want; Here is an example of 2 cmd shells, 1 PowerShell, and one wsl shell:
回答2:
To use a different shell in vscode:
- Use the shortcut Ctrl + Shift + P on your keyboard or go to view >> Command Palette
- Type in:
Terminal: select default shell
From there you can select a powershell terminal instead of the usual command prompt
VSCode Change Default Terminal
来源:https://stackoverflow.com/questions/59356929/how-to-install-windows-terminal-on-vs-code