CLion
 
Get CLion
Join the CLion 2025.1 Early Access Program and try out new features before they are released! Find out more

Debug forked processes

Last modified: 14 March 2024

In CLion, you can debug child processes created with the fork function. Use the context menu of the Threads & Variables pane to set up the follow and detach policies:

Follow/detach policies
 for multiprocess debug

These global settings change the debugger’s behavior.

Note that LLDB allows debugging only one process at a time, so the Detach Process on Fork is always selected for LLDB. GDB allows multiple connections and switching between them.