Reputation: 621
I yet succed this yet but I reinstall my Visual Studio Code and can't add node terminal to it again.
Please not say me I can run with bash also and use powershell. This two default reachable in Vscode.
But I would like change the deafult terminal and change to node terminal. Not powershell and not cmd...
I search very lot of website in this topic but vanish the solution. There is solution. I used at today node terminal in vs code.
So i should see node instead powershell or cmd.
Sorry if explain lot of but I want be very clear...
Upvotes: 9
Views: 26974
Reputation: 440431
For an overview of all types of shells used in Visual Studio Code, see this answer.
Custom shell profiles are maintained in the settings.json
file; to open it for editing, select Preferences: Open Settings (JSON)
from the command palette (Ctrl-Shift-P).
There are platform-specific properties named terminal.integrated.profiles.*
, where *
is either windows
, linux
, or osx
(macOS).
The properties inside each define shell profiles, i.e. the shells available for running in the integrated terminal via the dropdown menu labeled +
().
Each shell-profile definition:
At a minimum requires either a path
argument specifying the full path to the shell executable or, on Windows only, a source
argument, which can be PowerShell
or Git Bash
to let VS Code find the appropriate executables.
Start-up arguments are specified via args
.
For all supported properties, see the docs.
To set the default shell profile:
Either: use the Terminal: Select Default Profile
command from the command palette: a list of all defined profiles will present; select the one of interest.
settings.json
file for editing in order to customize the new profile.Or: Set the platform-appropriate terminal.integrated.defaultProfile.*
property to the name of the desired shell profile.
Example: Defining Node.js (node.exe
) as a custom shell profile on Windows:
node.exe
and escape \
characters for JSON by doubling them; e.g., from PowerShell:# Get node.exe's full path, escape '\' chars., copy to the clipboard.
(Get-Command node.exe).Path.Replace('\', '\\') | Set-Clipboard
settings.json
file (if the terminal.integrated.profiles.windows
property already exists, simply add the Node.js
property to it); the example uses node.exe
's default installation location, C:\Program Files\nodejs\node.exe
."terminal.integrated.profiles.windows": {
"Node.js": {
"path": "C:\\Program Files\\nodejs\\node.exe",
"args": [] // Add startup arguments as needed.
}
},
// Make Node.js the default shell (if the property already exists, update its value).
"terminal.integrated.defaultProfile.windows": "Node.js",
Upvotes: 10