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

![VS Code Status Bar — Qualcomm action buttons](https://mintcdn.com/qualcomm-prod/hlNuX08-pFFtVn68/archives/2.1/Tools/QVSCE/images/status_bar_buttons.png?fit=max\&auto=format\&n=hlNuX08-pFFtVn68\&q=85\&s=d827a5aa7263398dbdb51fc2d0155e2b)

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

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

```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
```

## Deploy

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

```bash theme={null}
# Equivalent SCP push
scp ./build/my-app user@<device-ip>:/usr/bin/my-app
```

## Run

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

```bash theme={null}
# Equivalent SSH invocation
ssh user@<device-ip> /usr/bin/my-app
```

## Debug

**1. Set a breakpoint**

Click in the gutter next to a source line to set a breakpoint.

**2. Start the debug session**

Click **Debug** in the Status Bar or press `F5`.

**3. 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

> [!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.

## Troubleshooting builds

> [accordion] 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] Binary not found on device after deploy
>
> Verify the active device is correctly set in **Dashboard → Devices**. Check that SSH connectivity is working:
>
> ```bash theme={null}
> ssh user@<device-ip> echo ok
> ```

> [accordion] 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 SSH to confirm.
