CLion 2026.1 Help

Debug Adapter Protocol

Besides LLDB and GDB, CLion can work with third-party debuggers that support the Debug Adapter Protocol (DAP). The DAP technology enables CLion to interact with various debugger implementations through a standardized interface. Ultimately, CLion’s DAP support provides a consistent debugging experience when using a new, non-LLDB/GDB debugger that supports this protocol.

Configure a DAP debugger

  1. Go to Settings | Build, Execution, Deployment | Debugger | DAP Debuggers and then click + to add a new DAP debugger.

    Adding a new DAP debugger
  2. Specify your DAP debugger’s name, path to the executable, arguments, and other parameters. Then, click Apply.

    Adding a path to the DAP debugger executable

    You can choose between communication over standard input/output (stdin/stdout) or over TCP. If TCP is selected, you must specify a port to connect to.

    Choosing a TCP connection

    Keep the following in mind when configuring a DAP debugger:

    • You can use the $DebuggerPort$ macro in different fields, such as DAP executable command-line arguments or Launch/Attach parameters, to insert the TCP port number specified in the Port field.

    • When you attach to a running process, the IDE always sends the Attach request. When you run a program with the debugger by clicking the icon in the toolbar, the IDE sends the Launch request. Most DAP debuggers expect the Launch request to start a debug session with the given executable. However, if your debugger requires the Attach request instead, you can configure the IDE to send it when starting a debug session.

    • The Launch parameters and Attach parameters are debugger-specific. CLion prefills them with sensible defaults that work for both GDB and LLDB. However, we recommend consulting the documentation for your specific debugger to determine which JSON parameters to use. CLion currently supports the $Executable$, $WorkingDir$, $Arguments$, $Environment$, and $EnvironmentArray$ macros in Launch parameters and the $Pid$ macro in Attach parameters. Code completion works for available macros and shows their meanings.

  3. Go to Settings | Build, Execution, Deployment | Toolchains and select your toolchain.

  4. Select your DAP debugger from the Debugger drop-down list and click OK.

    Selecting the DAP debugger in a toolchain

You can now perform standard debugger actions.

26 February 2026