CLion 2022.2 EAP3: CMakeCache Editor, Symbol Servers for Debug, Evaluation of Constant Values in the Editor
A new CLion 2022.2 EAP3, 222.2889.11, is available from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu). If you are on macOS, there is a separate build for Apple Silicon (M1 chip). Those who are already using EAP2 can apply a patch to update to EAP3.
The main highlights:
- A new UI for CMake cache variables.
- Ability to configure symbol servers when debugging on Windows.
- Auto import for the MSVC toolchain.
- Ability to view constant values in the Quick Documentation pop-up.
- Improved autocompletion for types.
UI for setting CMake options
The CMake cache may be thought of as a configuration file. The first time CMake is run on a project, it produces a CMakeCache.txt file in the top directory of the build tree. You can always open this file in CLion to review the CMake options you have configured.
Now, you can also review and update these options in the table in CLion’s UI. The CMakeCache viewer can be found in each CMake Profile under Settings / Preferences | Build, Execution, Deployment | CMake. The configured options are listed first.
Speed search goes through all the options names and option values, so simply put the table in focus and start typing to find what you need:
The values are editable in the table. Once you edit the value of the option, it becomes highlighted in italics. While bold values correspond to those defined in your CLion’s CMake options. The Minus button removed the option from the CMake options (but not from the CMakeCache). You can revert to the previous value by pressing the Revert button.
Advanced CMake cache options can be enabled via a dedicated setting in the UI. It’s deactivated by default, as typically users don’t modify them.
Symbol server when debugging on Windows
When debugging, sometimes the library symbols are not available on your local machine. In this case, you can use symbol servers.
The Symbol Server is a file server that stores your debug symbols centrally, on a server, rather than on each developer’s machine. Then, you can point your debugger to the Symbol Server to resolve symbol names. Everyone can share the same server.
In CLion on Windows, you can now point the debugger to the Symbol Server of your choice in Settings | Build, Execution, Deployment | Debugger | Symbol Servers:
CLion lets you configure symbol servers (or indexed storages) and non-indexed shared folders separately. And if you need to add a public Microsoft symbol server, simply click the corresponding link.
When configured for the first time, the download is triggered on the debugger session start. When the symbols are downloaded, library symbols will be correctly resolved. For example, frames from windows system libraries will be shown.
Before symbol server configured:
After symbol server configured:
The Enable symbol servers support setting there allows a debugger in CLion to use any downloaded symbols cache locally. The directory of this cache is configurable in the settings.
Note, this is only supported on Windows for Microsoft’s approach to symbol servers. And currently only .
pdb files are supported, not .
dll files (CPP-29389).
Auto import for the MSVC toolchain
In this EAP build, we enabled system headers indexing for the Microsoft Visual C++ toolchain. This means that auto import now works for it.
Showing constant values in Quick Documentation
When reading through the code base, you often want to check the value of constant expressions. This can help you understand the code more easily and maintain it more productively. CLion now allows you to view the value of the expressions evaluated at compile time:
constexpr calculations are typical use cases where it could be helpful:
It can also help you with the template magic:
The values are available in the Quick Documentation popup (
Ctrl+Q on Windows/Linux,
F1 on macOS). You can also enable this popup to be shown on mouse hover in Settings/Preferences | Editor | Code Editing | Quick Documentation.
This works for compile time expressions, but not for macros (due to the fact that they can be incomplete). However, macro replacement shown in the Quick Documentation can help you with macros in many cases.
Improved autocompletion for types
CLion can now autocomplete the type in the
The full release notes are available here.
Your CLion team
The Drive to Develop