← 返回命令列表

Linux command

pio-debug 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start debugging session

pio debug

Debug specific environment

pio debug -e [uno]

Debug with GDB interface

pio debug --interface=gdb

Debug with specific project directory

pio debug -d [path/to/project]

说明

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 `debug_build_flags` from platformio.ini (typically `-O0 -g3 -ggdb3` for full symbol information).

参数

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

FAQ

What is the pio-debug command used for?

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 `debug_build_flags` from platformio.ini (typically `-O0 -g3 -ggdb3` for full symbol information).

How do I run a basic pio-debug example?

Run `pio debug` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -e, --environment _name_ do in pio-debug?

Target environment from platformio.ini.