Attach a debugger to a running process.
Section: Debuggers and Core Dumps
Attach gdb to PID
bash
bash
gdb -p 1234Explanation
Attach a debugger to a running process.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Debuggers and Core Dumps
Batch backtrace with gdb
Collect all-thread backtraces from a live process.
Attach strace to a running PID
Attach to a live process and trace syscalls.