How to debug a forked child process using CLion

I debugged a Linux C program with the CLION internal debugger (which is gdb for Linux). The program was looking for a child process that should have been paused at the breakpoint I set. But the debugger did not stop even if I entered set follow-fork-mode child inside the gdb panel. So how can I do this with CLion?

+7
c linux clion
source share
1 answer

Make sure to set set follow-fork-mode child before using fork.

0
source share

All Articles