> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Visual Studio Code

> Set up VS Code on Ubuntu or Windows with WSL before installing the Qualcomm extension.

<Tabs>
  <Tab title="Windows (WSL)">
    <iframe src="https://players.brightcove.net/1414329538001/4JiZQnWhg_default/index.html?videoId=6396305824112" title="Getting Started with the Qualcomm® VS Code Extension on Windows" width="100%" height="420" allowFullScreen />

    ## Windows Setup with WSL

    The extension runs inside **WSL (Windows Subsystem for Linux)** with Ubuntu 22.04. Windows is the host OS; Ubuntu is where compilation and device communication happen.

    <Warning>
      Your machine must support virtualization. This may require an adjustment in BIOS/UEFI settings.
    </Warning>

    ### 1 — Install WSL and usbipd

    Open a Windows **Administrator** terminal and run:

    ```batch theme={null}
    wsl --install -d ubuntu-22.04
    winget install usbipd-win
    ```

    <Info>
      The WSL installer will prompt you to create a Linux username and password. **Do not use `root`** — the extension requires a regular user account.
    </Info>

    ### 2 — Restart and enter WSL

    Restart your machine. Then in any terminal:

    ```batch theme={null}
    wsl -d ubuntu-22.04
    ```

    ### 3 — Prepare the Ubuntu environment

    Inside the WSL Ubuntu shell:

    ```bash theme={null}
    sudo apt update && sudo apt upgrade
    sudo locale-gen en_US.UTF-8
    sudo update-locale
    sudo apt-get install gcc bzip2 diffstat g++ adb
    ```

    ### 4 — Launch VS Code from WSL

    ```bash theme={null}
    code .
    ```

    ### 5 — Install the WSL Extension

    In VS Code, install the **WSL** extension (by Microsoft) from the Marketplace. Refer to the [official instructions](https://code.visualstudio.com/docs/remote/wsl#_installation).

    Verify that VS Code shows **WSL: Ubuntu-22.04** in the status bar — see [From VS Code](https://code.visualstudio.com/docs/remote/wsl#_from-vs-code).

    ### 6 — Connect a USB device to WSL

    With a device plugged in, follow the [USB forwarding guide](wsl-usb) to forward it from Windows into WSL using `usbipd`.
  </Tab>

  <Tab title="Ubuntu">
    ## Ubuntu Setup

    Follow the [VS Code Linux installation guide](https://code.visualstudio.com/docs/setup/linux).

    <Warning>
      Install the `.deb` package from the VS Code website. The **Snap Store version is not supported** by the extension.
    </Warning>

    Verify the installation:

    ```bash theme={null}
    code -v
    ```

    Expected output — version, commit SHA, and architecture:

    ```text theme={null}
    1.78.1
    a4e8254e63e4b7a72896e74e12cc2098fcda1d6e
    x64
    ```

    ### Configure udev rules

    **Configure udev USB rules (one-time prerequisite)**

    The Linux kernel uses `udev` to control access to USB devices. Run the following to allow the Qualcomm vendor ID `05c6` without requiring `sudo` for every operation:

    ```bash theme={null}
    echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9008", MODE="0666", GROUP="plugdev"
    SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9135", MODE="0666", GROUP="plugdev"' \
      | sudo tee /etc/udev/rules.d/51-qcom-usb.rules
    ```

    Restart `udev` for the changes to take effect:

    ```bash theme={null}
    sudo systemctl restart udev
    ```

    If a device is already connected, **unplug and replug** it.

    <Note>
      Make sure your user account is a member of the `plugdev` group. See the [Android developer guide](https://developer.android.com/studio/run/device) for instructions.
    </Note>
  </Tab>
</Tabs>
