CLion 2022.3 EAP: CMake Debugger
A new CLion 2022.3 EAP build is available!
Download build 223.7255.15 from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu). Update via patch if you are using the previous EAP build.
CMake is a tricky scripting language that is sometimes hard to work with. Just watch this fantastic talk by Mateusz Pusz from CppNow 2021 and take the CMake quiz in the beginning of the presentation to test your CMake knowledge!
Since CMake is a language of a build system, identifying the best way to debug an error or a suspicious behavior in a CMake script is not always easy. That’s why we were really impressed by the idea for a CMake debugger from Sysprogs and their corresponding CMake fork that appeared some time ago in the community. We decided to proceed with it and develop it into an integrated debugger you can use in CLion. In CLion 2022.3 EAP5, you can finally give it a try.
How to start debugging CMake scripts
You can start the debugging session via the gutter icon. This icon appears in the top level CMake script of your project near the first command in the CMake file after the project has been reloaded and indexing has finished:
If CMake generation in CLion fails, you can also start CMake debug sessions from the CMake tool window, where the debug hint also appears:
Click it to launch the debugging session.
If you have ever debugged your code in CLion, you will find that many features you are already used to are in the CMake debugger as well, including the ability to set breakpoints, step through the code, and watch CMake variables, targets, and environment variables in the debugger tool window:
You can examine the values of variables right in the editor, next to their usages:
The environment is loaded for debug sessions just like it is in the real CMake launch, and the CMake debugger stops on CMake errors.
The CMake debugger only works with the CMake executable bundled into the CLion 2022.3 EAP builds – 3.24.2-dbg. It’s a custom CMake binary built from v3.24.2.
The CMake debugger works on all three major platforms and only for local toolchains. WSL, Remote, and Docker are not supported.
Additionally, the debugger only works for the CMake configuration step, so it does not debug your actual project build, and the project model is not reloaded after CMake execution under debug.
The CMake debugger is launched via the corresponding CMake Debug run/debug configuration. It’s created automatically from the run/debug configuration selected in the editor, or you can configure it manually via Run | Edit Configurations… There you can select CMake Profile and configure the Before launch steps:
Installers for Windows ARM64
We’re working to add support for Windows ARM64. JetBrains Runtime already has it, and we’re now porting native tools used by CLion like Clangd and others to Windows machines with ARM64 processors. Meanwhile, with CLion 2022.3 EAP5, we have started distributing installers for Windows ARM64 that you can download from our website or from the Toolbox App. Since the native tools have not yet been ported, these installers will only work for Windows 11, which is able to run both x64 and x86 binaries.
The full release notes are available here.
Here is a reminder about what has already been delivered in the CLion 2022.3 EAP:
- Enhanced CMake integration
- Built-in documentation for Clang-Tidy checks
- Ability to open documentation at cppreference.com
- Function return values in the debugger
- Azure RTOS thread view
- Syntax support for linker scripts
- New solution for settings synchronization
- Support for C++20 Modules
Download the latest EAP build to give the new features and enhancements a try, and be sure to share your feedback with us! EAP builds are free to use.
Your CLion team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
CLion 2023.3 EAP2: Support for Device Tree Files and Meson
The CLion 2023.3 Early Access Program has just started, featuring assembly view for files, enhanced C++ data flow analysis, and other updates. The CLion 2023.3 EAP2 build is ready for you to try! With it, you can finally start working on Meson projects in CLion and benefit from device tree format s…
The CLion 2023.3 Early Access Program Is Open
We recently shared our preliminary plans for v2023.3, which we plan to release at the end of November. We are now happy to announce that the CLion 2023.3 Early Access Program (EAP) starts today! Our EAP lets the community participate in discussions devoted to our products and influence the developm…
CLion 2023.2.2 Bug-Fix Update
The CLion bug-fix update 2023.2.2 is now available! The fixes included in this bug-fix update are listed below. Download build 232.9921.42 from our website, through the Toolbox App, as a snap package for Ubuntu, or via a patch from inside the IDE. DOWNLOAD CLION This update’s main highlights includ…
CLion 2023.2.1 Bug-Fix Update
The CLion bug-fix update 2023.2.1 is now available! If you haven’t yet upgraded to v2023.2, now is definitely a good time to do so! The key enhancements in the major 2023.2 update include: The Beta version of AI Assistant is now available as a plugin with limited access. Streamlined integratio…