How Do I Debug Linux?
Contents

How do I debug a Linux process?

Attaching an Already Running GDB to an Already Running Process

  1. Use the shell GDB command to run the ps command and find the program’s process id (pid): (gdb) shell ps -C program -o pid h pid. Replace program with a file name or path to the program.
  2. Use the attach command to attach GDB to the program: (gdb) attach pid.

Is Linux easy to debug?

The interactive graphical user interface is very robust and can display graphical data such as graphs and charts. Thanks to a massive amount of helpful resources, developers can adapt to this Linux debugger pretty easily.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest