This commit is contained in:
gregvanl 2022-01-06 14:52:38 -08:00
Родитель 23747747da
Коммит 4c12ffd232
8 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -9,7 +9,7 @@ MetaDescription: Configuring the C++ extension in Visual Studio Code to target g
---
# Using C++ and WSL in VS Code
In this tutorial, you will configure Visual Studio Code to use the GCC C++ compiler (g++) and GDB debugger on Ubuntu in the [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install-win10) (WSL). GCC stands for GNU Compiler Collection; GDB is the GNU debugger. WSL is a Linux environment within Windows that runs directly on the machine hardware, not in a virtual machine.
In this tutorial, you will configure Visual Studio Code to use the GCC C++ compiler (g++) and GDB debugger on Ubuntu in the [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install) (WSL). GCC stands for GNU Compiler Collection; GDB is the GNU debugger. WSL is a Linux environment within Windows that runs directly on the machine hardware, not in a virtual machine.
> **Note**: Much of this tutorial is applicable to working with C++ and VS Code directly on a Linux machine.
@ -27,7 +27,7 @@ To successfully complete this tutorial, you must do the following steps:
1. Install the [Remote - WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl).
1. Install [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install-win10) and then use the links on that same page to install your Linux distribution of choice. This tutorial uses Ubuntu. During installation, remember your Linux user password because you'll need it to install additional software.
1. Install [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install) and then use the links on that same page to install your Linux distribution of choice. This tutorial uses Ubuntu. During installation, remember your Linux user password because you'll need it to install additional software.
## Set up your Linux environment

Просмотреть файл

@ -426,7 +426,7 @@ There's a [dedicated troubleshooting guide](/docs/supporting/troubleshoot-termin
### Can I use the integrated terminal with the Windows Subsystem for Linux?
Yes. Select the [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install-win10) (WSL) bash shell as your terminal default. If you have WSL enabled (through Windows Features), select **WSL Bash** from the terminal **Select Default Shell** dropdown. See [Developing in WSL](/docs/remote/wsl.md) for details on working in WSL and the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension.
Yes. Select the [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install) (WSL) bash shell as your terminal default. If you have WSL enabled (through Windows Features), select **WSL Bash** from the terminal **Select Default Shell** dropdown. See [Developing in WSL](/docs/remote/wsl.md) for details on working in WSL and the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension.
### Why is VS Code shortcut X not working when the terminal has focus?

Просмотреть файл

@ -470,7 +470,7 @@ To force that a file is opened, add `--goto` or use:
An alternative to [using SSHFS to access remote files](#using-sshfs-to-access-files-on-your-remote-host) is to [use `rsync`](https://rsync.samba.org/) to copy the entire contents of a folder on remote host to your local machine. The `rsync` command will determine which files need to be updated each time it is run, which is far more efficient and convenient than using something like `scp` or `sftp`. This is primarily something to consider if you really need to use multi-file or performance intensive local tools.
The `rsync` command is available out of box on macOS and can be installed using Linux package managers (for example `sudo apt-get install rsync` on Debian/Ubuntu). For Windows, you'll need to either use [WSL](https://docs.microsoft.com/windows/wsl/install-win10) or [Cygwin](https://www.cygwin.com/) to access the command.
The `rsync` command is available out of box on macOS and can be installed using Linux package managers (for example `sudo apt-get install rsync` on Debian/Ubuntu). For Windows, you'll need to either use [WSL](https://docs.microsoft.com/windows/wsl/install) or [Cygwin](https://www.cygwin.com/) to access the command.
To use the command, navigate to the folder you want to store the synched contents and run the following replacing `user@hostname` with the remote user and hostname / IP and `/remote/source/code/path` with the remote source code location.

Просмотреть файл

@ -9,7 +9,7 @@ DateApproved: 12/8/2021
---
# Remote development in WSL
This tutorial walks you through enabling [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install-win10) (WSL) and running Visual Studio Code in WSL using the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension.
This tutorial walks you through enabling [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install) (WSL) and running Visual Studio Code in WSL using the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension.
## Prerequisites

Просмотреть файл

@ -25,7 +25,7 @@ This lets VS Code provide a **local-quality development experience** — includi
To get started, you need to:
1. Install the [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install-win10) along with your preferred Linux distribution.
1. Install the [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install) along with your preferred Linux distribution.
> **Note:** WSL 1 does have some [known limitations](#known-limitations) for certain types of development. Also, extensions installed in Alpine Linux may not work due to `glibc` dependencies in native source code inside the extension. See the [Remote Development and Linux](https://aka.ms/vscode-remote/linux) article for details.

Просмотреть файл

@ -170,7 +170,7 @@ sudo update-alternatives --install /usr/bin/editor editor $(which code) 10
## Windows as a Linux developer machine
Another option for Linux development with VS Code is to use a Windows machine with the [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install-win10) (WSL).
Another option for Linux development with VS Code is to use a Windows machine with the [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install) (WSL).
### Windows Subsystem for Linux

Просмотреть файл

@ -41,7 +41,7 @@ VS Code ships monthly [releases](/updates) and supports auto-update when a new r
## Windows Subsystem for Linux
Windows is a popular operating system and it can be a great cross-platform development environment. This section describes cross-platform features such as the [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install-win10) (WSL) and the new Windows Terminal.
Windows is a popular operating system and it can be a great cross-platform development environment. This section describes cross-platform features such as the [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install) (WSL) and the new Windows Terminal.
### Recent Windows build

Просмотреть файл

@ -95,4 +95,4 @@ Again, the command is restricted to extensions on the WSL side. To install an ex
### Shortcuts to install WSL and WSL distros
The [Remote - WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) now guides users how to install WSL and WSL distros when not yet present. It uses the new simplified [`wsl --install`](https://docs.microsoft.com/windows/wsl/install-win10#simplified-installation-for-windows-insiders) feature available in Windows Preview builds.
The [Remote - WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) now guides users how to install WSL and WSL distros when not yet present. It uses the new simplified [`wsl --install`](https://docs.microsoft.com/windows/wsl/install#install) feature available in Windows Preview builds.