News Releases

CLion 2022.3 Released!

This year’s third and biggest update of CLion is finally here. CLion 2022.3 is available in the Toolbox App, as a snap package (on Ubuntu), from our website, or via a patch update from version 2022.2.

CLion 2022.3 provides better user experience across the board, from projects with only a couple of C/C++ files to complex CMake-based applications. It also helps you adopt modern C++20 features and work in embedded and remote setups more productively.

CLion 2022.3 release

Read on for details about the key improvements in this version:

DOWNLOAD CLION 2022.3

Enhanced CMake experience

CMake’s popularity as a build system and project model for C++ projects has been growing year over year. Still, it is a tricky language, and introducing changes in CMake scripts can be painful. That’s why we’ve been working to improve CLion’s CMake integration and provide the tools to help you interact with CMake as easily as possible.

Our biggest success in this area is the new CMake Debugger. Have you ever imagined digging into an issue in a CMake script the way you do in regular code – setting breakpoints, stepping through the code, and watching CMake variables and targets? If so, then your dream has come true! Once your project has been reloaded and indexing has finished, a new gutter icon will appear in the top-level CMake script of your project near the first command in the CMake file. You’ll find the new debug action right there. A similar action is also suggested in the CMake tool window if CMake generation fails. Click it and proceed with debugging:

CMake Debug

Note that the CMake debugger only works with the CMake executable bundled with the CLion 2022.3 and only for local toolchains. WSL, Remote, and Docker are not supported. Learn more.

If you don’t debug your CMake scripts but simply update them, CLion 2022.3 also has something new and useful for you:

  • Settings for CMake colors and fonts to customize your editor.
  • The ability to expand and collapse various code regions in CMake to help you quickly read through the CMake code.
  • CMake structure view for easier navigation through CMakeLists.txt files:CMake Structure View
  • Strikethrough highlighting of deprecated commands in CMake:CMake deprecated commands
  • The CMake code documentation popup is now available for the selected options in the list of code completion suggestions.

And finally, in the find_package command, CLion now provides code completion for packages bundled with CMake:
CMake find_packages completion

Other CMake improvements include a new action to add a file to the existing CMake target, and the ability to run CMake targets with the root privileges as an extra task before starting the selected run/debug configuration.

C++20 Modules

We know that many members of the community have been waiting impatiently to start using this fantastic new C++ standard feature, but the tooling support has so far lagged behind. That’s why we prioritized this area of our C++ tools this year, and we’re proud to say both CLion and ReSharper C++ now provide C++20 modules support in the 2022.3 update!

CLion collects module information from all .ixx, .cppm, and .mxx files in the project and doesn’t rely on the specific approach you use to build modules. Whether it’s CMake with the Visual Studio C++ toolchain or CMake with Clang and specific compilation flags, CLion provides a similar experience, including:

  • Syntax highlighting for the new module keywords import, export, and module:Modules highlighting
  • Code completion for symbols from modules:Modules Completion
  • Navigation to declaration/definition for symbols from modules.
  • Find Usages and refactorings inside modules.
  • For symbols that cross module boundaries, preliminary versions of the Rename, Change Signature, and Extract refactorings are available only for files opened in CLion.

We are working to give you a way to add a new module from the project view, as well as other improvements for C++20 modules. Expect more enhancements in further updates!

Debugger

On macOS and Linux, CLion’s bundled LLDB version has been updated to LLDB 15. LLDB on Windows is a custom debugger we maintain for debugging with the Visual Studio C++ toolchain, so it was not affected by this update.

When you step out of a function that has a non-void return type, CLion now shows its return value in the debugger tool window’s Variables view:
Return value in debugger

We enabled the RTOS thread view for Azure RTOS in addition to the previously supported FreeRTOS and Zephyr. There are also a couple of RTOS-related fixes:

  • The FreeRTOS tasks that execute floating point instructions are now displayed correctly in the debugger.
  • The RTOS thread view now works for Symmetric Multiprocessing (SMP), but only if the processor cores are identical.

Clang-Tidy documentation

The popular code analyzer Clang-Tidy has been bundled with CLion for a while. In v2022.3, there’s now a way to find more details about specific checks right in the IDE. Click on the kebab (three dots) icon on the right-hand side of the Clang-Tidy tooltip in the editor, and then choose Show Inspection Description to get a short description of a Clang-Tidy check. Use the special Learn More link to navigate to the settings dialog and learn more about the check.
Clang-Tidy settings

The same documentation is available in the Clang-Tidy settings to help you configure the analyzer more thoughtfully.

Besides, the Clang-Tidy binary was updated to v16.0.0 in this release, bringing new checks and various LLVM fixes.

Code documentation

The Quick Documentation popup gives you tons of useful information about the code element at the caret, such as inferred types, macro replacement, values of constant expressions, enum values, and more. In this release, we’ve added the size of the type to the popup.

For definitions from the std namespace, the popup also includes a link to the cppreference.com article:
cppreference

Support for new languages and technologies

CLion provides support for several other languages and technologies in addition to C and C++ that you might want to use in your C/C++ projects. The list has been expanded:

  • IAR language extensions are now supported in CLion, including correct parsing and code highlighting.
  • Support for the Linker Script (LD) language includes code highlighting, completion, structure view, code folding, and Find Usages.
  • CLion now bundles all default web development plugins coming from WebStorm, such as NodeJS, Karma, AngularJS, and others.

Run a single file without a project

In CLion 2022.3, you can compile and run/debug a single file without creating, loading, and building a whole project. This is especially useful if you are getting started with C or C++ and have only one or two files that you want to compile and run. In this case, a project model is not essential and may as well as be omitted.

To run your C++ file, you’ll need a run/debug configuration of the new type C/C++ File. You can create it manually in the settings or have CLion create it for you by clicking on the run icon in the left-hand editor gutter:
Run icons

The configuration will compile the source files listed in it and will use the compiler options you configure there, which is exactly the information you usually put into your project model:
Run single file configuration

Learn more about running single files in our web help.

Remote development enhancements

CLion comes with several remote development scenarios supported, which we overviewed in a webinar earlier this year. First, v2022.3 brings performance improvements for remote development with local sources. Second, it provides an alternative way to work with projects in WSL2 (Windows Subsystem for Linux 2) via remote development with the thin client. Instead of running a full IDE on Windows, your IDE backend will launch directly in WSL2 itself, and then you can connect to it the same way you would connect to any remote machine when using remote development.

New UI

IntelliJ-based IDEs are receiving a new UI. Modern and clean, it aims to reduce visual complexity, provide easy access to essential features, and progressively disclose complex functionality as needed. To switch to the Beta version of the new UI in CLion, go to Settings/Preferences | Preferences | Appearance & Behavior | New UI.
New UI

New way to synchronize settings

A new solution for synchronizing settings is now available in all IntelliJ-based IDEs, including CLion. The settings are stored in the cloud attached to your JetBrains Account, so you can conveniently reuse them in different JetBrains IDEs. Enable/disable the new solution and manage what exactly you would like to synchronize in Settings / Preferences | Settings Sync | Enable Settings Sync. Learn more.

Rust

The IntelliJ Rust plugin now enables build script evaluation by default. The plugin now takes into account all generated items during code analysis, including source files, cfg options, and even environment variables. Read this blog post for more details.

For a long time, type rendering during debugging came with worse user experience for the MSVC toolchain than for macOS or Linux. Reasons included unexpected technical symbols and C-style naming for primitive types, among others. CLion 2022.3 improves this experience as built-in types are now rendered in the Debug View in the same way you are used to seeing them in source code.

The plugin also allows you to launch documentation tests right from the gutter the same way you launch unit or integration tests.

That’s all for now! We encourage you to give CLion 2022.3 a try. If you have an active subscription, you can update today. Otherwise, feel free to start your free 30-day trial to check out all the new features and improvements!

DOWNLOAD CLION 2022.3

Your CLion team
JetBrains
The Drive to Develop

image description