CLion 2021.2

Semplifica le configurazioni di compilazione e proteggi il codice dai tipici problemi di sicurezza della memoria C++.
Luglio 30, 2021
Nuova versione

Funzionalità

  • CMake support
    • CMake 3.20 - CMake 3.20 is now supported and bundled in CLion 2021.2. This version includes CMake Presets, major updates to the CMake File API, support for C++23 compiler modes and updates for CUDA developers.
    • CMake Presets - You can now store your project build configuration in new and universal CMake Presets and CLion will automatically detect and import the necessary CMake Build Presets. It will notify you and suggest reloading the presets if any changes are introduced to them, either in the editor or externally.
    • New CMake project templates - Additional templates for creating new CMake projects are now available in the New Project wizard. They cover C and C++ libraries and executables, CUDA libraries and executables and Qt projects.
    • CMake targets as Before Launch tasks - In the Before Launch section of the Run/Debug configuration, users can now specify CMake Target tasks, both built-in and user-specified. These tasks will be performed before starting the selected target.
  • Makefile projects
    • Support for GNU Autotools - CLion now automatically detects GNU Autotools, Kbuild and PERL MakeMaker projects. When these projects are loaded as Makefile projects, preconfiguration scripts are automatically detected and executed to get the Makefile and load the project from it.
    • Preconfiguration step - CLion 2021.2 detects whether the project has any configure.ac or configure scripts required to create its Makefile. On project load, these preconfiguration steps are executed automatically by using the command set in Settings | Build, Execution, Deployment | Makefile settings.
    • Load Makefile Project action - If you open a project in CLion without loading the Makefile project model, you can still load it later. This might happen if your project requires some custom preconfiguration steps and no final Makefile is available until those steps are finished. To load it, call the context menu on the project's top-level Makefile and select Load Makefile Project.
  • Debugger update
    • Microsoft Windows: better Natvis support - When you use the Microsoft Visual C++ toolchain on Windows, CLion now provides its own LLDB-based debugger. Data rendering in this debugger has also been improved in this release:
      • Natvis customization features such as Inheritable attribute, format specifiers and CustomListItems are now supported.
      • Built-in renderers have been improved by adding one-line colored summaries for all structures not covered by Natvis, enabling formatting for wide/Unicode strings and showing the [Raw View] for Natvis-generated values.
    • Windows: minidumps debug - Postmortem debugging with core dumps is now supported on Windows.
    • Windows: Run in external console - Instead of the internal console used by CLion, on Windows, it is now possible to switch to the cmd.exe console to run and debug applications. Use the Run in external console checkbox in Run/Debug configuration to change the behavior.
    • Relaxed breakpoints - There are cases with breakpoints when path mappings are too complex to fill them in in the debug configuration, or when the -fdebug-prefix-map option is set in the debugger. In these situations, it is now possible to use just the file name instead of its absolute path during debugging sessions.
    • Breakpoints in disassembly view - While stepping through assembly code, you can now add/remove breakpoints on instruction lines. For non-default configuration of these address breakpoints, use the right-click context menu menu.
    • Preview tab for Debugger - To avoid cluttering the editor with many tabs when stepping, consider enabling the preview tab. In this release it works during debug sessions and allows you to view files in a single tab one by one, without opening each file in a new tab.
    • Remote LLDB and LLDB 12 - To improve debugging with LLDB, LLDB v12.0 is now bundled. Remote debugging of any arbitrary executable from CLion is now possible with LLDB (in addition to GDB). Use the new Remote Debug configuration to provide arguments to connect to the remote host. On a remote host, you'll need to launch lldb-server/debugserver.
  • FreeRTOS thread view - If you debug applications with FreeRTOS in CLion, a view with the task lists is now available. You can switch to the task you are interested in to explore task variables and more.
  • Code Analysis - Diagnose common cases of dangling pointers and escaping from a local scope by using static analysis. This capability is made possible by the Lifetime Safety proposal that CLion has partially implemented. GSL annotations are also supported to let you mark your code and make local analysis more accurate.
  • Cling interpreter - Cling is an interactive C++ interpreter built on top of Clang and LLVM. It allows you to run code without building the project, which can be especially useful for prototyping and learning C++. Install Cling on your system and benefit from its integration with CLion:
    • Start a new Cling session.
    • Send included headers or selection to Cling.
    • Send the current line to the Cling session via the code intention.
  • Remote and Microsoft Windows Subsystem for Linux (WSL)
    • Profiling in remote mode and on WSL - Profiling is now possible in remote mode and on WSL. In both cases, the Perf backend is required.
    • Remote development in Docker - For Docker containers with mapped volumes, remote development without source synchronization is now available in CLion. This mode removes the code duplication and the initial project upload step.
    • WSL configuration - WSL configuration in CLion has become much easier, as you no longer need an SSH server inside a WSL distribution to work with WSL in CLion. A dedicated WSL API is now used. CLion now supports WSL whether it's installed from the Microsoft Store or a custom distribution.
    • Text search in Local History - Added the ability to text search through file revisions in Local History, helping you locate the point you want to roll back to more easily.
  • VCS
    • Changes to pre-commit checks - Expanded the list of possible pre-commit actions with the ability to execute tests. Tick the Run Tests checkbox and select the configuration to run. Also added the ability to customize the Analyze code and Cleanup options by clicking Choose profile next to them.
    • Unified Show Diff - CLion shows the difference between the initial and changed files in the editor by default, no matter where you invoke the Show Diff action. If you prefer to track changes in a separate window, simply drag the desired file outside the editor.
    • GPG signature - This release offers a way to secure your commits by enabling Git commit signing with GPG.
  • Toolbox App - You won't miss any critical product updates from the Toolbox App. Your IDE will now alert you if there is a new version available for download and give you the option to upgrade right from CLion.
  • Localized UI - You can now enjoy the CLion UI in Chinese, Korean, and Japanese. The fully localized UIs are available as non-bundled language pack plugins, which can be installed in CLion from Settings | Plugins.
  • Other enhancements - Some other useful improvements and enhancements in CLion 2021.2 include:
    • If you want certain operations to be performed on Save, you can now configure them all in one place, in Settings | Tools | Actions on Save.
    • It is now easier to reorganize tool windows. Hover over the top of the tool window you want to move, then drag it to where you want it and drop it there.
    • IntelliJ Rust introduced a new name resolution engine and initial WSL support. The plugin is now also capable of expanding certain procedural macros.
Debugging with Core Dumps

CLion

Un IDE multipiattaforma per C e C++.

CLion è disponibile anche in:

Hai una domanda?

Chatta live con i nostri specialisti di gestione delle licenze di JetBrains ora.