LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pio-debug

Start a debugging session for PlatformIO embedded projects

TLDR

Start debugging session
$ pio debug
copy
Debug specific environment
$ pio debug -e [uno]
copy
Debug with GDB interface
$ pio debug --interface=gdb
copy
Debug with specific project directory
$ pio debug -d [path/to/project]
copy

SYNOPSIS

pio debug [options]

DESCRIPTION

pio debug prepares a PlatformIO project for debugging or launches a debug server. It connects to on-chip debuggers (JTAG/SWD), enables setting breakpoints, stepping through code, and inspecting variables on embedded hardware.The binary shortcut piodebuggdb is equivalent to `pio debug --interface=gdb`. Debug builds use the `debugbuildflags` from platformio.ini (typically `-O0 -g3 -ggdb3` for full symbol information).

PARAMETERS

-e, --environment name

Target environment from platformio.ini.
--interface type
Debugger interface (gdb).
-d, --project-dir dir
Path to PlatformIO project directory (default: current).
--upload-port port
Upload port for the target board.
-v, --verbose
Verbose output for troubleshooting.
--project-conf path
Path to a specific platformio.ini file.

SEE ALSO

pio-run(1), pio-test(1), gdb(1)

Copied to clipboard
Kai