Console

Unlike ISE, the console (or terminal, as it is named) in VS Code must be configured. By default, the terminal in code uses cmd.exe.

The following process is used to make the terminal use PowerShell:

  1. Open User Settings from File and Preferences. The same may be achieved by pressing F1 and typing user settings followed by return.
  2. This opens two windows: a Default Settings file on the left and a settings.json on the right. The file on the right holds user-specific configuration that overrides or adds to the default.
  3. Expand the Integrated Terminal section in Default Settings (by clicking on the o9 symbol) to show the default values.
  4. On the right-hand side, enter the following between the curly braces:
"terminal.integrated.shell.windows": "C:\Windows\sysnative\WindowsPowerShell\v1.0\powershell.exe" 
  1. Save the changes, then press Ctrl + Shift + ' (apostrophe) to open a new PowerShell terminal. Ctrl + ' (apostrophe) toggles the visibility of the terminal window.
This is not ISE
In PowerShell ISE, F5 + F8 may be used to execute a script. This is not the case in VS Code. A selection may be executed by pressing F1 and typing run selected to filter options to Terminal: Run Selected Text in Active Terminal.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.212.217