2 просмотров
Рейтинг статьи
1 звезда2 звезды3 звезды4 звезды5 звезд
Загрузка...

VS Code Remote Development

VS Code Remote Development

Visual Studio Code Remote Development allows you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment. You can:

  • Develop on the same operating system you deploy to or use larger or more specialized hardware.
  • Sandbox your development environment to avoid impacting your local machine configuration.
  • Make it easy for new contributors to get started and keep everyone on a consistent environment.
  • Use tools or runtimes not available on your local OS or manage multiple versions of them.
  • Develop your Linux-deployed applications using the Windows Subsystem for Linux.
  • Access an existing development environment from multiple machines or locations.
  • Debug an application running somewhere else such as a customer site or in the cloud.

No source code needs to be on your local machine to get these benefits. Each extension in the Remote Development extension pack can run commands and other extensions directly inside a container, in WSL, or on a remote machine so that everything feels like it does when you run locally.

2. Enable USB debugging on your device

To enable USB debugging, you must enable Developer options on your device. To do this, find the build number in your device’s Settings menu. The location of the build number varies between devices; for stock Android, it’s usually Settings > About phone > Build number. For specific information on your device and Android version, refer to your hardware manufacturer.

After you navigate to the build number using the instructions above, tap on the build number seven times. A pop-up notification saying “You are now X steps away from being a developer” appears, with “X” being a number that counts down with every additional tap. On the seventh tap, Developer options are unlocked.

Note: On Android versions prior to 4.2 (Jelly Bean), the Developer options are enabled by default.

Go to Settings > Developer options (or, if this does not work, on some devices the path is Settings > System > Developer options), and check the USB debugging checkbox. Android now enters debug mode when it is connected to a computer via USB.

Connect your device to your computer using a USB cable. If you are developing on a Windows computer, you might need to install a device-specific USB driver. See the manufacturer website for your device for additional information.

The setup process differs for Windows and macOS and is explained in detail on the Android developer website. For more information on connecting your Android device to the SDK, refer to the Run Your App section of the Android Developer documentation.

Configuring RAD Studio to Work with Your Installed SDK

You can use specific versions of the Android SDK simply by pointing the RAD Studio SDK Manager to your installed location.

  1. Open the Create a New Android SDK wizard by using either Tools Options or Project Manager:
    • Choose Tools > Options > Environment Options >SDK Manager | Add | Add new.
    • In the Project Manager:
      1. Right-click the Android target platform and select Properties from the context menu.
      2. In the SDK field on the Platform Properties dialog box, click Add new in the dropdown list.
      3. On the Add a New SDK dialog, click Add new in the dropdown list.
  2. In the Android SDK Base Path and the Android NDK Base Path fields, browse to and select your installed and locations, respectively.
  3. The Create a new Android SDK wizard now populates the rest of the fields here and on the Android tools locations page. Allow a moment for this process to complete.
  4. For any fields that are not auto-populated or are marked with , click the entry field and browse to the installed location of that library on your system.

Getting started

Remote Development extension pack

The Remote Development extension pack includes three extensions. See the following articles to get started with each of them:

  • Remote — SSH — Connect to any location by opening folders on a remote machine/VM using SSH.
  • Remote — Containers — Work with a sandboxed toolchain or container-based application inside (or mounted into) a container.
  • Remote — WSL — Get a Linux-powered development experience in the Windows Subsystem for Linux.

While most VS Code extensions should work unmodified in a remote environment, extension authors can learn more at Supporting Remote Development.

Share more than screens

Lead your team with quick and natural collaboration using Live Share to edit and debug together in real time, no matter the language or platform. Personalize your session with access controls and custom editor settings that enforce consistent coding styles for everyone.

Configuring RAD Studio to Work with Your Installed SDK

You can use specific versions of the Android SDK simply by pointing the RAD Studio SDK Manager to your installed location.

  1. Open the Create a New Android SDK wizard by using either Tools Options or Project Manager:
    • Choose Tools > Options > Environment Options >SDK Manager | Add | Add new.
    • In the Project Manager:
      1. Right-click the Android target platform and select Properties from the context menu.
      2. In the SDK field on the Platform Properties dialog box, click Add new in the dropdown list.
      3. On the Add a New SDK dialog, click Add new in the dropdown list.
  2. In the Android SDK Base Path and the Android NDK Base Path fields, browse to and select your installed and locations, respectively.
  3. The Create a new Android SDK wizard now populates the rest of the fields here and on the Android tools locations page. Allow a moment for this process to complete.
  4. For any fields that are not auto-populated or are marked with , click the entry field and browse to the installed location of that library on your system.

Remote tutorials

The tutorials below will walk you through running Visual Studio Code with the Remote Development extensions.

Tutorial Description
Remote via SSH Connect to remote and virtual machines with Visual Studio Code via SSH.
Work in WSL Run Visual Studio Code in Windows Subsystem for Linux.
Develop in Containers Run Visual Studio Code in a Docker Container.
GitHub Codespaces Connect to a codespace with Visual Studio Code.
Ссылка на основную публикацию
Статьи c упоминанием слов:
Adblock
detector