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
CLion 2024.1 EAP 4: Switch to CLion Nova in CLion Classic
The CLion 2024.1 EAP 4 build (241.13688.39) is out! It is available from our website, via the Toolbox App, or as a snap package if you’re using Ubuntu. With this build, we’re making CLion Nova available to all CLion Classic users. Switch to it from inside the IDE via the settings menu and try it …
CLion 2024.1 EAP 3: Assembly View Enhancements
Today, the CLion 2024.1 EAP 3 build (241.12662.59) is available from our website, via the Toolbox App, or as a snap package if you’re using Ubuntu. Here are the main improvements: Assembly view improvements: The Assembly view for ARM targets is now shown correctly (CPP-36901). Assembly vi…
CLion 2024.1 EAP 2: Improved Terminal and Other UX Enhancements
Some time ago, we shared our plans and directions. Just a couple of weeks ago, we kicked off our CLion 2024.1 EAP with CMake coding assistance, code analysis in device tree files, and forked processes debugging. Today, the CLion 2024.1 EAP 2 build (241.11761.23) is available from our website, via…
CLion Nova: AI Assistant and Enhancements From CLion Classic and ReSharper v2024.1
CLion Nova is a free preview of CLion equipped with the ReSharper C++/Rider C++ language engine. With this update, CLion Nova has finally moved to the 2024.1 branch. This means that all of the enhancements brought by the CLion Classic 2024.1 EAP are now available in CLion Nova: CMake writing ass…