> ## 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.

# Status Bar

> Build, deploy, and run your application from the VS Code status bar.

## Status Bar Actions

The VS Code Status Bar at the bottom of the window contains action buttons added by the extension:

<img src="https://mintcdn.com/qualcomm-prod/C3kDUdllcH5eq3jY/Tools/QVSCE/images/status_bar_buttons.png?fit=max&auto=format&n=C3kDUdllcH5eq3jY&q=85&s=d61c51a239243b544eb62d961d4e973b" alt="VS Code Status Bar — Qualcomm action buttons" width="1548" height="1016" data-path="Tools/QVSCE/images/status_bar_buttons.png" />

| # | Button                        | Action                                          |
| - | ----------------------------- | ----------------------------------------------- |
| 1 | **Build**                     | Cross-compile the project for the active device |
| 2 | **Deploy**                    | Build + push the binary to the device           |
| 3 | **Run**                       | Execute the deployed binary on the device       |
| 4 | **Refresh Device**            | Re-scan for connected devices                   |
| 5 | **Select a Connected Device** | Choose which connected device to target         |

<Warning>
  **Deploy** installs the binary at `/usr/bin` by default. This **overwrites any
  existing binary** with the same name on the device. Rename your output binary
  if you want to keep multiple versions.
</Warning>

## Build

Click **Build** (or run the `Build` task via `Ctrl+Shift+B`). The extension uses the SDK toolchain configured by the workspace and compiles the project.

<CodeGroup>
  ```bash CMake project theme={null}
  cmake -B build -DCMAKE_TOOLCHAIN_FILE=$QSC_TOOLCHAIN
  cmake --build build
  ```

  ```bash Make project theme={null}
  make -j$(nproc) CROSS_COMPILE=$QSC_CROSS_PREFIX
  ```
</CodeGroup>

## Deploy

Click **Deploy**. The extension compiles the project (same as Build) and then pushes the binary over ADB or SSH.

```bash theme={null}
# Equivalent ADB push
adb push ./build/my-app /usr/bin/my-app
```

## Run

Click **Run** to execute the deployed binary on the active device. The extension launches the binary over ADB or SSH and streams its output to the integrated terminal.

```bash theme={null}
# Equivalent ADB invocation
adb shell /usr/bin/my-app
```

## Debug

<Steps>
  <Step title="Set a breakpoint">
    Click in the gutter next to a source line to set a breakpoint.
  </Step>

  <Step title="Start the debug session">
    Click **Debug** in the Status Bar or press `F5`.
  </Step>

  <Step title="Inspect state">
    The debug panel provides access to: - **Variables** pane — local and global
    variable values - **Watch** pane — custom expressions - **Call Stack** —
    full call chain from the breakpoint - **Registers** — hardware register
    contents - **Disassembly** — mixed source + assembly view - **Memory** — raw
    memory inspection
  </Step>
</Steps>

<Note>
  The debug configuration is auto-generated in `.vscode/launch.json`. Edit this
  file to change the remote target address, binary path, or GDB/LLDB arguments.
</Note>

## Troubleshooting builds

<AccordionGroup>
  <Accordion title="IntelliSense showing wrong errors">
    The `.vscode/c_cpp_properties.json` file may be stale. Run **QVSCE: Regenerate Workspace** from the Command Palette (`Ctrl+Shift+P`) to regenerate it.
  </Accordion>

  <Accordion title="Binary not found on device after deploy">
    Verify the active device is correctly set in **Dashboard → Devices**. Check that ADB/SSH connectivity is working:

    ```bash theme={null}
    adb devices   # ADB
    ssh user@<device-ip> echo ok   # SSH
    ```
  </Accordion>

  <Accordion title="Debug session fails to attach">
    Ensure the binary was compiled with debug symbols (`-g` flag). Verify that `gdbserver` is installed on the device — run `which gdbserver` over ADB/SSH to confirm.
  </Accordion>
</AccordionGroup>
