CLion 2020.3 Help

Remote debug via GDB/gdbserver

Remote debug via GDB/gdbserver is especially useful for the cases when building on target is expensive or unavailable: after placing the binary on the target and launching it under gdbserver, you can connect to it from CLion and get the full IDE debug experience like if your program was running locally.

CLion provides two configurations for remote GDB/gdbserver debug, Remote GDB Server and GDB Remote Debug.

  • Use Remote GDB Server if you work with a CMake project and if you want CLion to automatically build and upload the binary to the remote machine. This configuration will also launch the program under gdbserver for you, so you will not need to do that manually.

  • Use GDB Remote Debug if you already have the executable and the symbol file. This configuration is independent of a particular build system or project format. Note that you will need to synchronize the files and launch your program under gdbserver manually.

Last modified: 14 August 2020