CLion Kicks Off Its 2024.1 EAP
We recently shared our plans and directions for this year and for the 2024.1 release specifically. In this connection, the CLion team has identified the following key objectives for 2024:
- 🚀 Releasing CLion Nova within CLion Classic.
- 🌀 Bringing more value to C++ developers through AI Assistant.
- 🤖 More useful tools for embedded developers in CLion.
- 🪲 Debugger improvements.
Work on that roadmap is well underway, and today we’re starting the CLion 2024.1 Early Access Program (EAP), which already lets you preview the following improvements:
- A bundled CMake upgrade and CMake writing assistance.
- A Meson tool window, new Meson project support, and the ability to provide custom Meson settings.
- Code analysis in device tree files and other improvements.
- Support for debugging child processes on Linux and for remote toolchains.
- The option to scale down the entire IDE.
Our EAP allows the community to participate in discussions devoted to our products and influence the development plans ahead of the next stable CLion release. EAP builds are free to use. Give them a try, and let us know what you think about the changes! Share your feedback in the comments below or on our issue tracker.
Build 241.8102.118 is available from our website, via the Toolbox App, or as a snap package if you’re using Ubuntu.
CMake writing assistance
CLion 2024.1 comes with CMake 3.28 bundled. For the actual build tool, bundled Ninja has also been updated to v1.11, which is required for C++20 modules to work with CMake.
To help you write CMake files easily, we’ve added a few new abilities to assist you in CMake files. New live templates are added to automatically create add_executable
(type exe
) and add_library
(type lib
) CMake commands:
Code completion now works for target names:
You can also navigate to the corresponding add_library
or add_executable
commands from the target usage. Alternatively, you can find the usages of the target in your project (Alt+F7
):
When CMake fails to load because you don’t have the minimum required version of CMake enabled, CLion suggests a fix in the CMake tool window. Click Fix… and CLion will update the cmake_minimum_required
command for you.
Meson
Since v2023.3, CLion has included support for Meson. In the new version, we continue working on improving this support. CLion now comes with the Meson tool window (View | Tool Windows | Meson). There, you can find the list of build targets and useful commands, like clean
, install
, test
, and some others:
If you need to specify the custom path to the Meson executable, you can now do so in CLion’s Meson settings:
You can also use the Setup options field to provide any additional Meson commands.
Starting a new Meson project? The New Project wizard in CLion now comes with an option to help streamline the process:
File templates for this new Meson project can be configured in Settings/Preferences | Editor | File and Code Templates | Meson Project.
In addition, the following fixes have also been implemented for Meson:
- When you open a Meson project for the first time, CLion not only loads the Meson project for you but also creates all necessary run configurations.
- The non-default compiler is correctly used for compiling Meson projects when selected in the toolchain (CPP-35699).
Device tree files
If you develop for hardware and write device tree files, you can benefit from the device tree files coding assistance in CLion that was added in v2023.3. In this EAP, we improved it even more.
Several new code checks are now available to validate the correctness of your node description in device tree files. You can configure the scope, severity level, and highlighting type of your inspections in the Settings/Preferences | Editor | Inspections | Device tree.
For example, a Duplicate element inspection detects duplicate elements inside the device tree nodes. This could either be two or more properties with the same name or two or more nodes.
To validate node properties with binding, there are new checks for invalid property types and required or undeclared properties:
When an enumeration type is used, CLion validates the values for such properties:
Note that all inspections that work with property values (e.g. type checking or the enumeration values check) require Zephyr bindings.
To help you write device tree files, we’ve added code completion for the root node:
Other improvements for device tree files include:
- To highlight overwritten properties, a line marker is added to the line of the property.
- When inserting new properties, CLion uses default and constant values from Zephyr bindings.
- CMake synchronization with the Zephyr settings (Settings/Preferences | Languages & Frameworks | Device tree | Sync with CMake) is enabled by default.
Forked processes debugging
In CLion, it’s now possible to debug multi-process targets. In the context menu, you can update the follow and detach policies:
These global settings will change the debugger’s behavior. Learn how they work for GDB, for example.
There are a few known limitations:
- It works on Linux (with LLDB and GDB) and for remote toolchains (WSL, Remote, and Docker).
- Since LLDB allows debugging only one process at a time, detach is always selected for LLDB. GDB allows you to hold as many connections as you want and switch between them.
Option to scale down the entire IDE
CLion 2023.1 introduced the ability to zoom in and out of the entire IDE, adjusting the size of all UI elements simultaneously. However, the initial scaling range was limited to between 100 and 200%. In CLion 2024.1 EAP 1, we have incorporated a new option allowing users to scale down the IDE to 90%, 80%, or 70%, offering an extended range of customization options.
Finally, the input stream redirection option, which was present only for the CMake Application run configuration, is now also available in C/C++ File run configurations.
The full release notes are available here. Find out more about our plans for this release in the CLion 2024.1 roadmap.
Your CLion team
JetBrains
The Drive to Develop