CLion is a C/C++ IDE from JetBrains, available from the JetBrains website.
Undo supplies a plugin which integrates UndoDB into CLion, allowing you to interactively debug the application you’re currently developing from within the CLion IDE. Alternatively, you can load and analyse recordings of programs that use Undo’s <i>Live Recorder</i> technology, helping you to debug exact copies of your program’s execution.
There are a number of known issues with the plugin that you should be aware of prior to use. These are listed below.
- UndoDB requires you to agree to a set of license terms before using it. It is not currently possible to agree to these terms through the CLion plugin. As a workaround until this issue is resolved, you must start UndoDB from the Linux command line (by running ‘udb’) and follow the instructions to accept the license.
- (For Live Recorder users) Loading Undo Recordings is only possible once a normal debugging session has started. To load a recording, start a debugging session in the usual manner, then follow the instructions on loading a recording in the documentation below.
Enabling UndoDB within CLion¶
- Configure CLion to use UndoDB.
Choose File -> Settings... -> Build, Execution, Deployment -> Toolchains
Select Use specified GDB:
Enter the location of
udb in the text box (the button to the right
can be used to navigate the file tree). When CLion recognises the pathname, a
message will appear, eg “GDB version: GNU gdb (GDB) 7.7”. There will also be a
warning that the minimum supported GDB version is 7.8.x; this can be ignored.
- Install the plugin.
Choose File -> Settings... -> Plugins
Click Install plugin from disk... and navigate to your UndoDB
undo-clion.jar as the name of the plugin.
You should now see UndoDB reversible debugger extensions in the list of plugins. Restart CLion to enable the plugin.
Using UndoDB within CLion¶
Starting a debug session works exactly as normal with CLion. However the debugger toolbars have some new buttons.
If you are familiar with other UndoDB commands, they can be entered at the GDB console.