Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Командная строка Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠ° ΠΈ PowerShell для Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠΎΠ² Π² Visual Studio

Π’ Visual Studio 2019 Π΅ΡΡ‚ΡŒ Π΄Π²Π΅ ΠΎΠ±ΠΎΠ»ΠΎΡ‡ΠΊΠΈ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строки для Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠΎΠ²:

Командная строка Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠ° для Visual Studio β€” стандартная командная строка с ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π½Ρ‹ΠΌΠΈ ΠΏΠ΅Ρ€Π΅ΠΌΠ΅Π½Π½Ρ‹ΠΌΠΈ срСды, ΡƒΠΏΡ€ΠΎΡ‰Π°ΡŽΡ‰Π°Ρ Ρ€Π°Π±ΠΎΡ‚Ρƒ с инструмСнтами Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠΈ. Доступно с вСрсии Visual Studio 2015.

PowerShell для Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠΎΠ² Visual Studio β€” Π±ΠΎΠ»Π΅Π΅ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΎΠ½Π°Π»ΡŒΠ½ΠΎΠ΅ срСдство, Ρ‡Π΅ΠΌ командная строка. НапримСр, Π² Π½Π΅ΠΌ ΠΌΠΎΠΆΠ½ΠΎ ΠΏΠ΅Ρ€Π΅Π΄Π°Ρ‚ΡŒ Ρ€Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚ ΠΎΠ΄Π½ΠΎΠΉ ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹ (Π½Π°Π·Ρ‹Π²Π°Π΅ΠΌΠΎΠΉ cmdlet ) Π² Π΄Ρ€ΡƒΠ³ΠΎΠΉ cmdlet. Π’ этой ΠΎΠ±ΠΎΠ»ΠΎΡ‡ΠΊΠ΅ доступны Ρ‚Π΅ ΠΆΠ΅ ΠΏΠ΅Ρ€Π΅ΠΌΠ΅Π½Π½Ρ‹Π΅ срСды, Ρ‡Ρ‚ΠΎ ΠΈ Π² Командной строкС Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠ°. Доступно с вСрсии Visual Studio 2019.

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Начиная с вСрсии 16.5, Π² Visual Studio 2019 доступСн встроСнный Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π», Π³Π΄Π΅ ΠΌΠΎΠΆΠ½ΠΎ Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ ΠΊΠ°ΠΊ с Командной строкой Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠ°, Ρ‚Π°ΠΊ ΠΈ с PowerShell для Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠΎΠ². МоТно ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ нСсколько Π²ΠΊΠ»Π°Π΄ΠΎΠΊ для ΠΊΠ°ΠΆΠ΄ΠΎΠΉ ΠΎΠ±ΠΎΠ»ΠΎΡ‡ΠΊΠΈ. Π’Π΅Ρ€ΠΌΠΈΠ½Π°Π» Visual Studio построСн Π½Π° основС Π’Π΅Ρ€ΠΌΠΈΠ½Π°Π»Π° Windows. Π§Ρ‚ΠΎΠ±Ρ‹ ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» Π² Visual Studio, Π²Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ элСмСнты Π’ΠΈΠ΄ > Π’Π΅Ρ€ΠΌΠΈΠ½Π°Π».

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

ΠŸΡ€ΠΈ запускС Π² Visual Studio ΠΎΠ΄Π½ΠΎΠΉ ΠΈΠ· ΠΎΠ±ΠΎΠ»ΠΎΡ‡Π΅ΠΊ ΠΊΠ°ΠΊ ΠΎΡ‚Π΄Π΅Π»ΡŒΠ½ΠΎΠ³ΠΎ прилоТСния ΠΈΠ»ΠΈ Π² ΠΎΠΊΠ½Π΅ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π»Π° открываСтся ΠΊΠ°Ρ‚Π°Π»ΠΎΠ³ Ρ‚Π΅ΠΊΡƒΡ‰Π΅Π³ΠΎ Ρ€Π΅ΡˆΠ΅Π½ΠΈΡ (Ссли ΠΎΠ½ΠΎ Π·Π°Π³Ρ€ΡƒΠΆΠ΅Π½ΠΎ). Π­Ρ‚ΠΎ ΡƒΠΏΡ€ΠΎΡ‰Π°Π΅Ρ‚ Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½ΠΈΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄ для Ρ€Π΅ΡˆΠ΅Π½ΠΈΡ ΠΈΠ»ΠΈ Π΅Π³ΠΎ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ΠΎΠ².

Π’ ΠΎΠ±Π΅ΠΈΡ… ΠΎΠ±ΠΎΠ»ΠΎΡ‡ΠΊΠ°Ρ… Π·Π°Π΄Π°Π½Ρ‹ ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π½Ρ‹Π΅ ΠΏΠ΅Ρ€Π΅ΠΌΠ΅Π½Π½Ρ‹Π΅ срСды. Π­Ρ‚ΠΎ ΡƒΠΏΡ€ΠΎΡ‰Π°Π΅Ρ‚ Ρ€Π°Π±ΠΎΡ‚Ρƒ с инструмСнтами ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строки. ΠžΡ‚ΠΊΡ€Ρ‹Π² эти ΠΎΠ±ΠΎΠ»ΠΎΡ‡ΠΊΠΈ, ΠΌΠΎΠΆΠ½ΠΎ Π²Ρ‹ΠΏΠΎΠ»Π½ΡΡ‚ΡŒ ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹ для Ρ€Π°Π·Π»ΠΈΡ‡Π½Ρ‹Ρ… слуТСбных ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌ, Π½Π΅ указывая ΠΈΡ… располоТСния.

Запуск Π² Visual Studio

Π’Ρ‹ΠΏΠΎΠ»Π½ΠΈΡ‚Π΅ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠ΅ дСйствия, Ρ‡Ρ‚ΠΎΠ±Ρ‹ ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Π² Visual Studio ΠšΠΎΠΌΠ°Π½Π΄Π½ΡƒΡŽ строку Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠ° ΠΈΠ»ΠΈ PowerShell для Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠΎΠ²:

ЗапуститС Visual Studio.

Π’ строкС мСню Π²Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ элСмСнты Π˜Π½ΡΡ‚Ρ€ΡƒΠΌΠ΅Π½Ρ‚Ρ‹ > Командная строка > Командная строка Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠ° ΠΈΠ»ΠΈ PowerShell для Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠΎΠ².

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Запуск ΠΈΠ· мСню Windows

Π”Ρ€ΡƒΠ³ΠΎΠΉ способ запуска ΠΎΠ±ΠΎΠ»ΠΎΡ‡Π΅ΠΊ β€” ΠΈΠ· мСню «ΠŸΡƒΡΠΊ». Π’ зависимости ΠΎΡ‚ вСрсии Visual Studio, Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎ установлСнных ΠΏΠ°ΠΊΠ΅Ρ‚ΠΎΠ² SDK ΠΈ Ρ€Π°Π±ΠΎΡ‡ΠΈΡ… Π½Π°Π³Ρ€ΡƒΠ·ΠΎΠΊ ΠΌΠΎΠΆΠ΅Ρ‚ ΠΈΠΌΠ΅Ρ‚ΡŒΡΡ нСсколько Π²Π°Ρ€ΠΈΠ°Π½Ρ‚ΠΎΠ² ΠΊΠΎΠΌΠ°Π½Π΄Π½Ρ‹Ρ… строк.

Windows 10

Π Π°Π·Π²Π΅Ρ€Π½ΠΈΡ‚Π΅ ΠΏΠ°ΠΏΠΊΡƒ Visual Studio 2019.

Π’Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ Π²Π°Ρ€ΠΈΠ°Π½Ρ‚ Developer Command Prompt for VS 2019 (Командная строка Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠ° для VS 2019) ΠΈΠ»ΠΈ Developer PowerShell for VS 2019 (PowerShell для Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠΎΠ² для VS 2019).

ΠšΡ€ΠΎΠΌΠ΅ Ρ‚ΠΎΠ³ΠΎ, Π²Ρ‹ ΠΌΠΎΠΆΠ΅Ρ‚Π΅ Π½Π°Ρ‡Π°Ρ‚ΡŒ Π²Π²ΠΎΠ΄ΠΈΡ‚ΡŒ имя ΠΎΠ±ΠΎΠ»ΠΎΡ‡ΠΊΠΈ Π² ΠΏΠΎΠ»Π΅ поиска Π½Π° ΠΏΠ°Π½Π΅Π»ΠΈ Π·Π°Π΄Π°Ρ‡ ΠΈ Π²Ρ‹Π±Ρ€Π°Ρ‚ΡŒ Π½ΡƒΠΆΠ½Ρ‹ΠΉ Ρ€Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚, Ρ‚Π°ΠΊ ΠΊΠ°ΠΊ Π² спискС Ρ€Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚ΠΎΠ² Π½Π°Ρ‡Π½ΡƒΡ‚ ΠΎΡ‚ΠΎΠ±Ρ€Π°ΠΆΠ°Ρ‚ΡŒΡΡ Π½Π°ΠΉΠ΄Π΅Π½Π½Ρ‹Π΅ совпадСния.

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Windows 8.1

На Π½Π°Ρ‡Π°Π»ΡŒΠ½ΠΎΠΌ экранС Π½Π°ΠΆΠΌΠΈΡ‚Π΅ Ctrl+Tab, Ρ‡Ρ‚ΠΎΠ±Ρ‹ ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ список ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ, Π° Π·Π°Ρ‚Π΅ΠΌ Π½Π°ΠΆΠΌΠΈΡ‚Π΅ V. ΠŸΠΎΡΠ²ΠΈΡ‚ΡΡ список, Π²ΠΊΠ»ΡŽΡ‡Π°ΡŽΡ‰ΠΈΠΉ всС установлСнныС ΠΊΠΎΠΌΠ°Π½Π΄Π½Ρ‹Π΅ строки Visual Studio.

Π’Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ Π²Π°Ρ€ΠΈΠ°Π½Ρ‚ Developer Command Prompt for VS 2019 (Командная строка Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠ° для VS 2019) ΠΈΠ»ΠΈ Developer PowerShell for VS 2019 (PowerShell для Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠΎΠ² для VS 2019).

Windows 7

Π’Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ ΠŸΡƒΡΠΊ Π° Π·Π°Ρ‚Π΅ΠΌ Ρ€Π°Π·Π²Π΅Ρ€Π½ΠΈΡ‚Π΅ ВсС ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹.

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Если установлСны Π΄Ρ€ΡƒΠ³ΠΈΠ΅ ΠΏΠ°ΠΊΠ΅Ρ‚Ρ‹ SDK, Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€, ΠΏΠ°ΠΊΠ΅Ρ‚ SDK для Windows 10 ΠΈΠ»ΠΈ ΠΏΡ€Π΅Π΄Ρ‹Π΄ΡƒΡ‰ΠΈΡ… вСрсий, ΠΌΠΎΠ³ΡƒΡ‚ ΠΏΠΎΡΠ²ΠΈΡ‚ΡŒΡΡ Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡ‚Π΅Π»ΡŒΠ½Ρ‹Π΅ ΠΊΠΎΠΌΠ°Π½Π΄Π½Ρ‹Π΅ строки. ВрСбуСмая вСрсия ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строки ΡƒΠΊΠ°Π·Π°Π½Π° Π² Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΠΈ ΠΏΠΎ ΡΠΎΠΎΡ‚Π²Π΅Ρ‚ΡΡ‚Π²ΡƒΡŽΡ‰ΠΈΠΌ инструмСнтам.

Запуск ΠΈΠ· обозрСватСля Ρ„Π°ΠΉΠ»ΠΎΠ²

ΠžΠ±Ρ‹Ρ‡Π½ΠΎ ярлыки для установлСнных ΠΎΠ±ΠΎΠ»ΠΎΡ‡Π΅ΠΊ ΠΏΠΎΠΌΠ΅Ρ‰Π°ΡŽΡ‚ΡΡ Π² ΠΏΠ°ΠΏΠΊΡƒ мСню «ΠŸΡƒΡΠΊ» для Visual Studio, Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€ Π² %ProgramData%\Microsoft\Windows\Start Menu\Programs\Visual Studio 2019\Visual Studio Tools. Но Ссли поиск ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строки Π½Π΅ Π΄Π°Π΅Ρ‚ ΠΎΠΆΠΈΠ΄Π°Π΅ΠΌΡ‹Ρ… Ρ€Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚ΠΎΠ², ΠΏΠΎΠΏΡ€ΠΎΠ±ΡƒΠΉΡ‚Π΅ Π²Ρ€ΡƒΡ‡Π½ΡƒΡŽ Π½Π°ΠΉΡ‚ΠΈ Π½ΡƒΠΆΠ½Ρ‹Π΅ Ρ„Π°ΠΉΠ»Ρ‹ Π½Π° ΠΊΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€Π΅.

Командная строка Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠ°

Π’Ρ‹ΠΏΠΎΠ»Π½ΠΈΡ‚Π΅ поиск Ρ„Π°ΠΉΠ»Π° ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строки (VsDevCmd.bat) ΠΈΠ»ΠΈ ΠΏΠ΅Ρ€Π΅ΠΉΠ΄ΠΈΡ‚Π΅ Π² ΠΏΠ°ΠΏΠΊΡƒ «Π˜Π½ΡΡ‚Ρ€ΡƒΠΌΠ΅Π½Ρ‚Ρ‹» Visual Studio ( %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools β€” ΠΏΡƒΡ‚ΡŒ зависит ΠΎΡ‚ вСрсии Visual Studio, выпуска ΠΈ располоТСния установки).

Когда Π²Ρ‹ Π½Π°ΠΉΠ΄Π΅Ρ‚Π΅ Ρ„Π°ΠΉΠ» ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строки, ΠΎΡ‚ΠΊΡ€ΠΎΠΉΡ‚Π΅ Π΅Π³ΠΎ. Для этого Π²Π²Π΅Π΄ΠΈΡ‚Π΅ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΡƒΡŽ ΠΊΠΎΠΌΠ°Π½Π΄Ρƒ Π² стандартном ΠΎΠΊΠ½Π΅ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строки:

ΠšΡ€ΠΎΠΌΠ΅ Ρ‚ΠΎΠ³ΠΎ, Π²Ρ‹ ΠΌΠΎΠΆΠ΅Ρ‚Π΅ ввСсти ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΡƒΡŽ ΠΊΠΎΠΌΠ°Π½Π΄Ρƒ Π² Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²ΠΎΠΌ ΠΎΠΊΠ½Π΅ Windows Π’Ρ‹ΠΏΠΎΠ»Π½ΠΈΡ‚ΡŒ:

Π’Π°ΠΌ Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎ ΠΈΠ·ΠΌΠ΅Π½ΠΈΡ‚ΡŒ ΠΏΡƒΡ‚ΡŒ Π² соотвСтствии с располоТСниСм установки Visual Studio.

PowerShell для Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠΎΠ²

НайдитС Ρ„Π°ΠΉΠ» скрипта PowerShell с ΠΈΠΌΠ΅Π½Π΅ΠΌ Launch-VsDevShell.ps1 ΠΈΠ»ΠΈ ΠΏΠ΅Ρ€Π΅ΠΉΠ΄ΠΈΡ‚Π΅ Π² ΠΏΠ°ΠΏΠΊΡƒ «Π˜Π½ΡΡ‚Ρ€ΡƒΠΌΠ΅Π½Ρ‚Ρ‹» Visual Studio ( %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools). ΠŸΡƒΡ‚ΡŒ зависит ΠΎΡ‚ вСрсии, выпуска ΠΈ располоТСния установки Visual Studio. ПослС этого Π²Ρ‹ΠΏΠΎΠ»Π½ΠΈΡ‚Π΅ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΡƒΡŽ ΠΊΠΎΠΌΠ°Π½Π΄Ρƒ Π² ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строкС Windows PowerShell ΠΈΠ»ΠΈ PowerShell 6:

По ΡƒΠΌΠΎΠ»Ρ‡Π°Π½ΠΈΡŽ PowerShell для Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠΎΠ² запускаСтся с ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠ΅ΠΉ для Ρ‚ΠΎΠΉ вСрсии Visual Studio, ΠΏΡƒΡ‚ΡŒ установки ΠΊ ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠΉ ΡƒΠΊΠ°Π·Π°Π½ Π² Ρ„Π°ΠΉΠ»Π΅ Launch-VsDevShell.ps1.

Π§Ρ‚ΠΎΠ±Ρ‹ Π²Ρ‹ΠΏΠΎΠ»Π½ΠΈΡ‚ΡŒ cmdlet, Π½ΡƒΠΆΠ½ΠΎ Π·Π°Π΄Π°Ρ‚ΡŒ ΠΏΠΎΠ»ΠΈΡ‚ΠΈΠΊΡƒ выполнСния.

Π˜ΡΡ‚ΠΎΡ‡Π½ΠΈΠΊ

Integrated Terminal

Visual Studio Code includes a fully-featured integrated terminal that conveniently starts at the root of your workspace. It provides integration with the editor to support features like links and error detection.

To open the terminal:

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Note: Open an external terminal with the β‡§βŒ˜C (Windows, Linux Ctrl+Shift+C ) keyboard shortcut if you prefer to work outside VS Code.

Terminal shells

The integrated terminal can use various shells installed on your machine, with the defaults being:

You can select other available shells to use in terminal instances or as the default such as Command Prompt on Windows, and zsh on macOS and Linux.

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

You can learn more about configuring terminal shells in the terminal profiles section below.

Note: If you’re having trouble launching your preferred shell in the integrated terminal, it may be due to your shell’s configuration or a VS Code terminal setting. There’s a dedicated troubleshooting guide to help you with these sorts of problems.

Managing terminals

The terminal tabs UI is on the right side of the terminal view. Each terminal has an entry with its name, icon, color, and group decoration (if any).

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Tip: Change the tabs location using the terminal.integrated.tabs.location setting.

Terminal instances can be added by selecting the + icon on the top-right of the TERMINAL panel, selecting a profile from the terminal dropdown, or by triggering the βŒƒβ‡§` (Windows, Linux Ctrl+Shift+` ) command. This action creates another entry in the tab list associated with that terminal.

Icons may appear to the right of the terminal title on the tab label when a terminal’s status changes. Some examples are a bell (macOS) and for tasks, displaying a check mark when there are no errors and an X otherwise. Hover the icon to read status information, which may contain actions.

Grouping

Split the terminal by:

Tabs support drag and drop to allow rearranging. Dragging an entry in a terminal group into the empty will remove it from the group (for example, unsplit). Dragging a tab into the main terminal area allows joining a group.

Unsplit a split terminal by triggering the Terminal: Unsplit Terminal command.

Customizing Tabs

Change the terminal’s name, icon, and tab color via the right-click context menu or by triggering the following commands:

CommandCommand ID
Terminal: Renameworkbench.action.terminal.rename
Terminal: Change Iconworkbench.action.terminal.changeIcon
Terminal: Change Colorworkbench.action.terminal.changeColor

Tip: Go back to the old version by setting terminal.integrated.tabs.enabled:false

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Terminal profiles

Terminal profiles are platform-specific shell configurations comprised of an executable path, arguments, and other customizations.

You can use variables in terminal profiles as shown in the example above with the APPDATA environment variable. You can find a list of available variables in the Variables Reference topic.

Configure your default integrated terminal by running the Terminal: Select Default Profile command, which is also accessible via the terminal dropdown.

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Configuring profiles

To create a new profile, run the Terminal: Select Default Profile command and activate the configure button on the right side of the shell to base it on. This will add a new entry to your settings that can be tweaked manually in your settings.json file.

Other arguments supported in profiles include:

The default profile can be defined manually with the terminal.integrated.defaultProfile.* settings. This should be set to the name of an existing profile:

Tip: The integrated terminal shell is running with the permissions of VS Code. If you need to run a shell command with elevated (administrator) or different permissions, use platform utilities such as runas.exe within a terminal.

Removing built-in profiles

Configuring the task/debug profile

By default, the task/debug features will use the default profile. To override that, use the terminal.integrated.automationShell.

Working directory

By default, the terminal will open at the folder that is opened in the Explorer. The terminal.integrated.cwd setting allows specifying a custom path to open instead:

Split terminals on Windows will start in the directory that the parent terminal started with. On macOS and Linux, split terminals will inherit the current working directory of the parent terminal. This behavior can be changed using the terminal.integrated.splitCwd setting:

There are also extensions available that give more options such as Terminal Here.

Terminal process reconnection

Local and remote terminal processes are restored on window reload, such as when an extension install requires a reload. The terminal will be reconnected and the UI state of the terminals will be restored, including the active tab and split terminal relative dimensions.

Links

The terminal features link detection, showing an underline when files or URLs are hovered with the mouse that will go to the target when Ctrl / Cmd is held. If a file or URL cannot be detected, they are still surfaced as «low confidence» links, which only show an underline when hovered. These low confidence links will search the workspace for the term, opening the match if one is found.

Clicking a file link will either open that document in an editor or produce a Quick Pick with all matches.

Extensions make use of links in the terminal, such as GitLens, to identify branches.

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Local echo

On some remote connections, there’s a delay between typing and seeing the characters on the terminal as a result of the round trip the data has to make from VS code to the process. Local echo attempts to predict modifications and cursor movements made locally in the terminal to decrease this lag.

Terminal appearance

Customize the terminal’s appearance using the following settings:

Copy & Paste

The keybindings for copy and paste follow platform standards:

Using the mouse

Right-click behavior

The right-click behavior differs based on the platform:

This can be configured using the terminal.integrated.rightClickBehavior setting.

Alt click

Alt left click will reposition the cursor to underneath the mouse. This works by simulating arrow keystrokes, which may fail for some shells or programs. This feature can be disabled.

Keybindings and the shell

Look at the setting details to see the complete list of default commands.

Chord keybindings in the terminal

By default, when a chord keybinding is the highest priority keybinding, it will always skip the terminal shell (bypassing terminal.integrated.commandsToSkipShell ) and be evaluated by VS Code instead of the terminal. This is typically the desired behavior unless you’re on Windows/Linux and want your shell to use ctrl+k (for bash, this cuts the line after the cursor). This can be disabled with the following setting:

Send text via a keybinding

The workbench.action.terminal.sendSequence command can be used to send a specific sequence of text to the terminal, including escape sequences. This enables things like sending arrow keys, enter, cursor moves, etc. For example, the below sequence jumps over the word to the left of the cursor ( Ctrl+Left ) and presses backspace:

Note that the command only works with the \u0000 format for using characters via their character code (not \x00 ). Read more about these hex codes and the sequences terminals work with on the following resources:

Run selected text

To use the runSelectedText command, select text in an editor and run the command Terminal: Run Selected Text in Active Terminal via the Command Palette ( β‡§βŒ˜P (Windows, Linux Ctrl+Shift+P ) ):

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

The terminal will attempt to run the selected text.

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

If no text is selected in the active editor, the line that the cursor is on is run in the terminal.

Automating launching of terminals

This file could be committed to the repository to share with other developers or created as a user task via the workbench.action.tasks.openUserTasks command.

Next steps

The basics of the terminal have been covered in this document. Read on to find out more about:

Common questions

I’m having problems launching the terminal

There’s a dedicated troubleshooting guide for these sorts of problems.

Can I use the integrated terminal with the Windows Subsystem for Linux?

Why is VS Code shortcut X not working when the terminal has focus?

Currently, the terminal consumes many key bindings, preventing Visual Studio Code from reacting to them. An example of this is Ctrl+B to open the Side Bar on Linux and Windows. This is necessary as various terminal programs and/or shells may respond to these key bindings themselves. Use the terminal.integrated.commandsToSkipShell setting to prevent specific key bindings from being handled by the terminal.

Can I use Cmder’s shell with the terminal on Windows?

Yes, to use the Cmder shell in VS Code, you need to add the following settings to your settings.json file:

You may refer to Cmder’s wiki for more information.

Why is Cmd+k/Ctrl+k not clearing the terminal?

Normally Cmd+k / Ctrl+k clears the terminal on macOS/Windows, but this can stop working when chord keybindings are added either by the user or extensions. The Cmd+k / Ctrl+k keybindings rely on the VS Code keybinding priority system that defines which keybinding is active at any given time (user > extension > default). To fix this, you need to redefine your user keybinding that will have priority, preferably at the bottom of your user keybindings.json file:

Why is nvm complaining about a prefix option when the integrated terminal is launched?

nvm (Node Version Manager) users often see this error for the first time inside VS Code’s integrated terminal:

This is mostly a macOS problem and does not happen in external terminals. The typical reasons for this are the following:

To resolve this issue, you need to track down where the old npm is installed and remove both it and its out-of-date node_modules. Find the nvm initialization script and run which npm before it runs, which should print the path when you launch a new terminal.

Once you have the path to npm, find the old node_modules by resolving the symlink by running a command something like this:

This will give you the resolved path at the end:

From there, removing the files and relaunching VS Code should fix the issue:

Can I use Powerline fonts in the integrated terminal?

Yes. Specify Powerline fonts with the terminal.integrated.fontFamily setting.

Note that you want to specify the font family, not an individual font like Meslo LG M DZ Regular for Powerline where Regular is the specific font name.

How do I configure zsh on macOS to jump words with Ctrl+Left/Right arrow?

By default, Ctrl+Left/Right arrow will jump words in bash. Configure the same for zsh by adding these keybindings:

Why does macOS make a ding sound when I resize terminal split panes?

The keybindings βŒƒβŒ˜β† and βŒƒβŒ˜β†’ are the defaults for resizing individual split panes in the terminal. While they work, they also cause a system «invalid key» sound to play due to an issue in Chromium. The recommended workaround is to tell macOS to no-op for these keybindings by running this in your terminal:

Why is my terminal showing a multi-colored triangle or a completely black rectangle?

This can happen on macOS because of how the terminal launches using VS Code’s environment. When VS Code launches for the first time, to source your «development environment,» it launches your configured shell as a login shell, which runs your

/.zprofile scripts. Now when the terminal launches, it also runs as a login shell, which will put the standard paths to the front (for example, /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin ) and reinitialize your shell environment.

To get a better understanding, you can simulate what is happening by launching an inner login shell within your operating system’s built-in terminal:

Unfortunately, unlike in Linux, standalone macOS terminals all run as login shells by default, since macOS does not run a login shell when the user logs into the system. This encourages «bad behavior,» like initializing aliases in your profile script when they should live in your rc script as that runs on non-login shells.

/.zshrc file since aliases only apply to the shell they’re set in.

I’m having problems with the terminal rendering. What can I do?

By default, the integrated terminal will render using GPU acceleration on most machines. It does this using multiple elements, which are better tuned than the DOM for rendering interactive text that changes often. The terminal features 3 renderers that fallback if they are detected to perform poorly in this order:

Π˜ΡΡ‚ΠΎΡ‡Π½ΠΈΠΊ

ΠŸΡ€Π΅Π΄Π²Π°Ρ€ΠΈΡ‚Π΅Π»ΡŒΠ½Ρ‹Π΅ трСбования

Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ прилоТСния

ЗапуститС Visual Studio Code.

Π’ Π³Π»Π°Π²Π½ΠΎΠΌ мСню Π²Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ Π€Π°ΠΉΠ» > ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ ΠΏΠ°ΠΏΠΊΡƒ (Π² macOS Π²Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ File > Open. (Π€Π°ΠΉΠ» > ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ)).

Π’ Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²ΠΎΠΌ ΠΎΠΊΠ½Π΅ ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ ΠΏΠ°ΠΏΠΊΡƒ создайтС ΠΏΠ°ΠΏΠΊΡƒ HelloWorld ΠΈ Π²Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ Π΅Π΅. Π—Π°Ρ‚Π΅ΠΌ Ρ‰Π΅Π»ΠΊΠ½ΠΈΡ‚Π΅ Π’Ρ‹Π±Ρ€Π°Ρ‚ΡŒ ΠΏΠ°ΠΏΠΊΡƒ (ΠΈΠ»ΠΈ ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Π² macOS).

Π’ Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²ΠΎΠΌ ΠΎΠΊΠ½Π΅ ΠΎ Π΄ΠΎΠ²Π΅Ρ€ΠΈΠΈ Π°Π²Ρ‚ΠΎΡ€Π°ΠΌ Ρ„Π°ΠΉΠ»ΠΎΠ² Π² этой ΠΏΠ°ΠΏΠΊΠ΅ Π²Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ Π”Π°, я Π΄ΠΎΠ²Π΅Ρ€ΡΡŽ Π°Π²Ρ‚ΠΎΡ€Π°ΠΌ.

ΠžΡ‚ΠΊΡ€ΠΎΠΉΡ‚Π΅ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» Π² Visual Studio Code, Π²Ρ‹Π±Ρ€Π°Π² Π² основном мСню ΠΏΡƒΠ½ΠΊΡ‚ Π’ΠΈΠ΄ > Π’Π΅Ρ€ΠΌΠΈΠ½Π°Π».

ΠžΡ‚ΠΊΡ€ΠΎΠ΅Ρ‚ΡΡ ΠΎΠΊΠ½ΠΎ Π’Π΅Ρ€ΠΌΠΈΠ½Π°Π» с ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строкой Π² ΠΏΠ°ΠΏΠΊΠ΅ HelloWorld.

Π’ ΠΎΠΊΠ½Π΅ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π»Π° Π²Π²Π΅Π΄ΠΈΡ‚Π΅ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΡƒΡŽ ΠΊΠΎΠΌΠ°Π½Π΄Ρƒ:

Π¨Π°Π±Π»ΠΎΠ½ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° создаСт простоС ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅, ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠ΅ ΠΎΡ‚ΠΎΠ±Ρ€Π°ΠΆΠ°Π΅Ρ‚ «Hello World» Π² ΠΎΠΊΠ½Π΅ консоли, вызывая ΠΌΠ΅Ρ‚ΠΎΠ΄ Console.WriteLine(String) ΠΈΠ· Ρ„Π°ΠΉΠ»Π° Program.cs.

Π—Π°ΠΌΠ΅Π½ΠΈΡ‚Π΅ содСрТимоС Program.cs ΠΊΠΎΠ΄ΠΎΠΌ ΠΈΠ· этого ΠΏΡ€ΠΈΠΌΠ΅Ρ€Π°.

ΠŸΡ€ΠΈ ΠΏΠ΅Ρ€Π²ΠΎΠΌ Ρ€Π΅Π΄Π°ΠΊΡ‚ΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠΈ Ρ„Π°ΠΉΠ»Π° .cs Π² Visual Studio Code Π±ΡƒΠ΄Π΅Ρ‚ ΠΏΡ€Π΅Π΄Π»ΠΎΠΆΠ΅Π½ΠΎ Π΄ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ Π½Π΅Π΄ΠΎΡΡ‚Π°ΡŽΡ‰ΠΈΠ΅ рСсурсы для сборки ΠΈ ΠΎΡ‚Π»Π°Π΄ΠΊΠΈ прилоТСния. Π’Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ Π”Π° ΠΈ Visual Studio Code создаст ΠΏΠ°ΠΏΠΊΡƒ .vscode с Ρ„Π°ΠΉΠ»Π°ΠΌΠΈ launch.json ΠΈ tasks.json.

Запуск прилоТСния

Π’Ρ‹ΠΏΠΎΠ»Π½ΠΈΡ‚Π΅ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹ Π² ΠΎΠΊΠ½Π΅ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π»Π°:

Π’ ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ΅ отобразится сообщСниС «Hello World!», послС Ρ‡Π΅Π³ΠΎ ΠΎΠ½Π° Π·Π°Π²Π΅Ρ€ΡˆΠΈΡ‚ΡΡ.

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Π£Π»ΡƒΡ‡ΡˆΠ΅Π½ΠΈΠ΅ прилоТСния

Π”Π°Π²Π°ΠΉΡ‚Π΅ Ρ€Π°ΡΡˆΠΈΡ€ΠΈΠΌ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅. Π’Π΅ΠΏΠ΅Ρ€ΡŒ Ρƒ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Ρ Π±ΡƒΠ΄Π΅Ρ‚ Π·Π°ΠΏΡ€Π°ΡˆΠΈΠ²Π°Ρ‚ΡŒΡΡ имя, ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠ΅ Π·Π°Ρ‚Π΅ΠΌ Π±ΡƒΠ΄Π΅Ρ‚ ΠΎΡ‚ΠΎΠ±Ρ€Π°ΠΆΠ°Ρ‚ΡŒΡΡ с Π΄Π°Ρ‚ΠΎΠΉ ΠΈ Π²Ρ€Π΅ΠΌΠ΅Π½Π΅ΠΌ.

ΠžΡ‚ΠΊΡ€ΠΎΠΉΡ‚Π΅ Ρ„Π°ΠΉΠ» Program.cs.

Π’ Program.cs Π·Π°ΠΌΠ΅Π½ΠΈΡ‚Π΅ содСрТимоС ΠΌΠ΅Ρ‚ΠΎΠ΄Π° Main (строка, Π²Ρ‹Π·Ρ‹Π²Π°ΡŽΡ‰Π°Ρ Console.WriteLine ) ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠΌ ΠΊΠΎΠ΄ΠΎΠΌ:

NewLine β€” это нСзависимый ΠΎΡ‚ ΠΏΠ»Π°Ρ‚Ρ„ΠΎΡ€ΠΌΡ‹ ΠΈ языка способ для прСдставлСния Ρ€Π°Π·Ρ€Ρ‹Π²Π° строки. Π•Π³ΠΎ Π°Π»ΡŒΡ‚Π΅Ρ€Π½Π°Ρ‚ΠΈΠ²Π°ΠΌΠΈ ΡΠ²Π»ΡΡŽΡ‚ΡΡ \n Π² C# ΠΈ vbCrLf Π² Visual Basic.

Π’ Visual Studio Code Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎ явно ΡΠΎΡ…Ρ€Π°Π½ΠΈΡ‚ΡŒ измСнСния. Π’ ΠΎΡ‚Π»ΠΈΡ‡ΠΈΠ΅ ΠΎΡ‚ Visual Studio, измСнСния Ρ„Π°ΠΉΠ»ΠΎΠ² Π½Π΅ ΡΠΎΡ…Ρ€Π°Π½ΡΡŽΡ‚ΡΡ автоматичСски ΠΏΡ€ΠΈ сборкС ΠΈ запускС прилоТСния.

ЗапуститС ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡƒ Π΅Ρ‰Π΅ Ρ€Π°Π·:

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

НаТмитС Π»ΡŽΠ±ΡƒΡŽ ΠΊΠ»Π°Π²ΠΈΡˆΡƒ для Π²Ρ‹Ρ…ΠΎΠ΄Π° ΠΈΠ· ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹.

Π”ΠΎΠΏΠΎΠ»Π½ΠΈΡ‚Π΅Π»ΡŒΠ½Ρ‹Π΅ рСсурсы

Π‘Π»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠ΅ шаги

ΠŸΡ€Π΅Π΄Π²Π°Ρ€ΠΈΡ‚Π΅Π»ΡŒΠ½Ρ‹Π΅ трСбования

Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ прилоТСния

ЗапуститС Visual Studio Code.

Π’ Π³Π»Π°Π²Π½ΠΎΠΌ мСню Π²Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ Π€Π°ΠΉΠ» > ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ ΠΏΠ°ΠΏΠΊΡƒ (Π² macOS Π²Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ File > Open. (Π€Π°ΠΉΠ» > ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ)).

Π’ Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²ΠΎΠΌ ΠΎΠΊΠ½Π΅ ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚ΠΈΠ΅ ΠΏΠ°ΠΏΠΊΠΈ создайтС ΠΏΠ°ΠΏΠΊΡƒ HelloWorld ΠΈ Ρ‰Π΅Π»ΠΊΠ½ΠΈΡ‚Π΅ Π’Ρ‹Π±Ρ€Π°Ρ‚ΡŒ ΠΏΠ°ΠΏΠΊΡƒ (Π² macOS Ρ‰Π΅Π»ΠΊΠ½ΠΈΡ‚Π΅ Open (ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ)).

ΠžΡ‚ΠΊΡ€ΠΎΠΉΡ‚Π΅ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» Π² Visual Studio Code, Π²Ρ‹Π±Ρ€Π°Π² Π² основном мСню ΠΏΡƒΠ½ΠΊΡ‚ Π’ΠΈΠ΄ > Π’Π΅Ρ€ΠΌΠΈΠ½Π°Π».

ΠžΡ‚ΠΊΡ€ΠΎΠ΅Ρ‚ΡΡ ΠΎΠΊΠ½ΠΎ Π’Π΅Ρ€ΠΌΠΈΠ½Π°Π» с ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строкой Π² ΠΏΠ°ΠΏΠΊΠ΅ HelloWorld.

Π’ ΠΎΠΊΠ½Π΅ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π»Π° Π²Π²Π΅Π΄ΠΈΡ‚Π΅ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΡƒΡŽ ΠΊΠΎΠΌΠ°Π½Π΄Ρƒ:

Π­Ρ‚ΠΎΡ‚ шаблон создаСт простоС ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Hello World. Он Π²Ρ‹Π·Ρ‹Π²Π°Π΅Ρ‚ ΠΌΠ΅Ρ‚ΠΎΠ΄ Console.WriteLine(String) для Π²Ρ‹Π²ΠΎΠ΄Π° » Hello World! » Π² ΠΎΠΊΠ½Π΅ консоли.

Main β€” Ρ‚ΠΎΡ‡ΠΊΠ° Π²Ρ…ΠΎΠ΄Π° Π² ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅. Π­Ρ‚ΠΎ ΠΌΠ΅Ρ‚ΠΎΠ΄, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ автоматичСски вызываСтся срСдой выполнСния ΠΏΡ€ΠΈ запускС прилоТСния. ВсС Π°Ρ€Π³ΡƒΠΌΠ΅Π½Ρ‚Ρ‹, прСдоставлСнныС Π² ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строкС ΠΏΡ€ΠΈ запускС прилоТСния, доступны Ρ‡Π΅Ρ€Π΅Π· массив args.

Запуск прилоТСния

Π’Ρ‹ΠΏΠΎΠ»Π½ΠΈΡ‚Π΅ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹ Π² ΠΎΠΊΠ½Π΅ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π»Π°:

Π’ ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ΅ отобразится сообщСниС «Hello World!», послС Ρ‡Π΅Π³ΠΎ ΠΎΠ½Π° Π·Π°Π²Π΅Ρ€ΡˆΠΈΡ‚ΡΡ.

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Π£Π»ΡƒΡ‡ΡˆΠ΅Π½ΠΈΠ΅ прилоТСния

Π”Π°Π²Π°ΠΉΡ‚Π΅ Ρ€Π°ΡΡˆΠΈΡ€ΠΈΠΌ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅. Π’Π΅ΠΏΠ΅Ρ€ΡŒ Ρƒ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Ρ Π±ΡƒΠ΄Π΅Ρ‚ Π·Π°ΠΏΡ€Π°ΡˆΠΈΠ²Π°Ρ‚ΡŒΡΡ имя, ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠ΅ Π·Π°Ρ‚Π΅ΠΌ Π±ΡƒΠ΄Π΅Ρ‚ ΠΎΡ‚ΠΎΠ±Ρ€Π°ΠΆΠ°Ρ‚ΡŒΡΡ с Π΄Π°Ρ‚ΠΎΠΉ ΠΈ Π²Ρ€Π΅ΠΌΠ΅Π½Π΅ΠΌ.

ΠžΡ‚ΠΊΡ€ΠΎΠΉΡ‚Π΅ Ρ„Π°ΠΉΠ» Program.cs, Ρ‰Π΅Π»ΠΊΠ½ΡƒΠ² Π΅Π³ΠΎ.

Когда Π²Ρ‹ Π² ΠΏΠ΅Ρ€Π²Ρ‹ΠΉ Ρ€Π°Π· ΠΎΡ‚ΠΊΡ€Ρ‹Π²Π°Π΅Ρ‚Π΅ Ρ„Π°ΠΉΠ» C# Π² Visual Studio Code, Π² Ρ€Π΅Π΄Π°ΠΊΡ‚ΠΎΡ€Π΅ загруТаСтся OmniSharp.

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Когда Π² Visual Studio Code Π±ΡƒΠ΄Π΅Ρ‚ ΠΏΡ€Π΅Π΄Π»ΠΎΠΆΠ΅Π½ΠΎ Π΄ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ Π½Π΅Π΄ΠΎΡΡ‚Π°ΡŽΡ‰ΠΈΠ΅ рСсурсы для сборки ΠΈ ΠΎΡ‚Π»Π°Π΄ΠΊΠΈ прилоТСния, Π²Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ Π”Π°.

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

Π’ Program.cs Π·Π°ΠΌΠ΅Π½ΠΈΡ‚Π΅ содСрТимоС ΠΌΠ΅Ρ‚ΠΎΠ΄Π° Main (строка, Π²Ρ‹Π·Ρ‹Π²Π°ΡŽΡ‰Π°Ρ Console.WriteLine ) ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠΌ ΠΊΠΎΠ΄ΠΎΠΌ:

NewLine β€” это нСзависимый ΠΎΡ‚ ΠΏΠ»Π°Ρ‚Ρ„ΠΎΡ€ΠΌΡ‹ ΠΈ языка способ для прСдставлСния Ρ€Π°Π·Ρ€Ρ‹Π²Π° строки. Π•Π³ΠΎ Π°Π»ΡŒΡ‚Π΅Ρ€Π½Π°Ρ‚ΠΈΠ²Π°ΠΌΠΈ ΡΠ²Π»ΡΡŽΡ‚ΡΡ \n Π² C# ΠΈ vbCrLf Π² Visual Basic.

Π’ Visual Studio Code Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎ явно ΡΠΎΡ…Ρ€Π°Π½ΠΈΡ‚ΡŒ измСнСния. Π’ ΠΎΡ‚Π»ΠΈΡ‡ΠΈΠ΅ ΠΎΡ‚ Visual Studio, измСнСния Ρ„Π°ΠΉΠ»ΠΎΠ² Π½Π΅ ΡΠΎΡ…Ρ€Π°Π½ΡΡŽΡ‚ΡΡ автоматичСски ΠΏΡ€ΠΈ сборкС ΠΈ запускС прилоТСния.

ЗапуститС ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡƒ Π΅Ρ‰Π΅ Ρ€Π°Π·:

Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π» vs code

НаТмитС Π»ΡŽΠ±ΡƒΡŽ ΠΊΠ»Π°Π²ΠΈΡˆΡƒ для Π²Ρ‹Ρ…ΠΎΠ΄Π° ΠΈΠ· ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹.

Π”ΠΎΠΏΠΎΠ»Π½ΠΈΡ‚Π΅Π»ΡŒΠ½Ρ‹Π΅ рСсурсы

Π‘Π»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠ΅ шаги

Π˜ΡΡ‚ΠΎΡ‡Π½ΠΈΠΊ

Π”ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ

Π’Π°Ρˆ адрСс email Π½Π΅ Π±ΡƒΠ΄Π΅Ρ‚ ΠΎΠΏΡƒΠ±Π»ΠΈΠΊΠΎΠ²Π°Π½. ΠžΠ±ΡΠ·Π°Ρ‚Π΅Π»ΡŒΠ½Ρ‹Π΅ поля ΠΏΠΎΠΌΠ΅Ρ‡Π΅Π½Ρ‹ *