CLion 2021.2 Help

Remote debug via gdbserver/lldb-server

Remote debug via gdbserver/lldb-server 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 or lldb-server, 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 gdbserver/lldb-server debug, Remote GDB Server (the case of GDB only) and Remote Debug (for both GDB and LLDB).

  • 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 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/lldb-server manually.

Last modified: 10 June 2021