CLion API Documentation


Is there any API documentation for the CLion Plugin API, especially the parts that are specific to CLion? For example, I am currently trying to find out what the parameters for loadForRemoteAttach on the LLDBDriver class is.

The reason I am looking at that method is because I want to start LLDB and remotely connect (using gdb-remote) it to a debugserver that the plugin will start. Didn't know if there's an existing method of doing this?

Official comment

Hi Wesley,

I apologize that is took too long to answer. If this is still relevant, please find the answer below.

The complete signature of the method in question is:

public Inferior loadForRemoteAttach(@NotNull String bundleOrExecutablePath,
@Nullable String architectureId,
@NotNull GeneralCommandLine installedCommandLine,
int pid,
@Nullable File sysroot,
@NotNull List<DebuggerDriver.PathMapping> pathMappings,
@Nullable String execSearchPaths) throws ExecutionException;

If your plugin take care of launching or attaching to the target by itself, and the only thing you need is to connect to the prepared debugserver, then the proper method to do that is loadForAttachDebugServer:

public Inferior loadForAttachDebugServer(@NotNull String connectionUrl,
@Nullable File executable,
@Nullable String architectureId,
@NotNull List<DebuggerDriver.PathMapping> pathMappings,
@Nullable String plugin) throws ExecutionException;

Note that as my colleague Anna already mentioned above, this is an internal API, which is subject to change. In this particular case, the plan is to unify the ways the GDB and LLDB drivers connect to gdbserver/lldb-server under a common roof of a proper CidrDebugProcess implementation subclass. This is WIP now with no ETA though.

Hope this helps.


CLion doesn’t provide its own public API with the guaranteed stability and detailed descriptions. 

The web help article about developing plugins for CLion:


Please sign in to leave a comment.