---
title: "<code class=\"docutils literal notranslate\"><span class=\"pre\">pbl</span> <span class=\"pre\">debug</span></code>"
canonical_url: https://developer.repebble.com/pebbleos/docs/pbl/debug/
last_updated: 2026-10-21
sdk_version: 4.33.1
---
# <code class="docutils literal notranslate"><span class="pre">pbl</span> <span class="pre">debug</span></code>

Source: https://developer.repebble.com/pebbleos/docs/pbl/debug/

Attach GDB to the firmware.

```
pbl debug
```

On QEMU boards this attaches to the emulator through a proxy that walks the kernel’s thread list, so `info threads` and per-thread backtraces work. On a watch it needs a runner with debug support, i.e. OpenOCD; boards flashed through sftool cannot be debugged this way. [Debugging](https://developer.repebble.com/pebbleos/docs/development/debugging.md) describes the GDB extensions the firmware ships with.

## Options

```
pbl debug [-h] [-b DIR] [--dry-run] [-r {nrfutil,openocd,sftool}] [--tty TTY]
```

`-r, --runner {nrfutil,openocd,sftool}`

Override the board’s runner

`--tty TTY`

Serial port for the sftool runner

Generated from PebbleOS [3a7b71785](https://github.com/coredevices/pebbleos/commit/3a7b71785fd439666c4a8bc116f561140e8dec01). This page is maintained in the pebbleos repository: [docs/pbl/debug.md](https://github.com/coredevices/pebbleos/blob/3a7b71785fd439666c4a8bc116f561140e8dec01/docs/pbl/debug.md).
