CLion 2019.2

Improves embedded development and debugging capability.
July 25, 2019
New Version

Features

Embedded Development

  • On-Chip debugging with GDB Server - If it’s possible to debug on the micro-controller of your choice with a GDB Server, you can now do it from CLion using a special Embedded GDB Server Run/Debug configuration. It covers OpenOCD, ST-Link GDB Servers, Segger J-Link GDB Server, QEMU, and many other specific GDB Servers. Create a configuration, providing a path to GDB Server, arguments to run the server, and other appropriate settings, and you are all set and ready to debug on-chip from CLion.
  • Peripherals
  • Peripheral View for ARM Devices - When debugging on-chip, it’s crucial to have the ability to view the peripherals. In CLion, this view is now available for two types of Run/Debug configurations: Embedded GDB Server and OpenOCD Download & Run. In both cases, a Peripherals tab appears in the debug tool window when you start debugging. Load the appropriate .svd file for your board and select the active peripherals you need to see.

Debugger

  • Pending, resolved, and invalid breakpoints - CLion 2019.2 now distinguishes three types of line breakpoints:
    • Pending: Line breakpoint is out of the debugging session, which means the session hasn’t started yet or the corresponding shared library hasn’t been loaded yet).
    • Resolved: Line breakpoint is successfully resolved by GDB or LLDB using the provided debug symbols, and can be hit during the execution.
    • Invalid: Line breakpoint can’t be resolved by GDB or LLDB and can never be hit.
  • The types are detected automatically on the fly and the breakpoint icons are updated accordingly.
  • Completion for GDB/LLDB commands - If you prefer the command line interface of GDB/LLDB and use the debugger console available in the debug tool window, you will benefit from completion for GDB/LLDB commands. Use Tab or Ctrl+Space to invoke it. This completion is powered by GDB or LLDB, respectively; CLion simply gives you access to the suggestions.
  • An experimental debugger for the MSVC toolchain - If you use the Microsoft Visual C++ toolchain in CLion, now you can try a new experimental debugger. It’s implemented by the JetBrains team on top of LLDB and is bundled into CLion. To enable bundled support for native visualizers, use Settings | Build, Execution, Deployment | Debugger Data Views | Enable NatVis renderers for LLDB.

Memory View

  • When debugging your application, you can easily review the memory behind a pointer: in the Variables view of the debug tool window, press Ctrl+Enter on a pointer to invoke the Memory View. In 2019.2, updated the Memory View to make it even more useful.
  • Go to address - Navigate to a particular address in memory from the Memory View. Use the hex value representing an address, a pointer variable, or call the address (&) of any variable you are interested in.
  • ASCII View - If you are interested in the ASCII memory format, you’ll find the ASCII view in the column on the right of the Memory View useful.

Parameter hints

  • Thanks to parameter name hints in v2019.2, you can avoid switching to the function signature while exploring a function call. This in turn should help increase the code readability.
  • For function calls, lambdas, constructors, initializer lists, and macro expressions, CLion shows the names of the parameters for the passed arguments. This works if an argument is a literal or an expression with more than one operand.

Code analysis

  • Unused Includes - The ‘unused includes’ check is back and completely reimplemented on top of the Clangd-based engine. It suggests 3 detection strategies: a conservative one, an aggressive one, and the default one (Detect not directly used) which is the closest to the “Include What You Use” principle.
  • Clang-Tidy update - The Clang-Tidy bundled binary was updated to the newest version, which brings a set of new checks to CLion. This includes some new abseil-* checks, a few from the clang-analyzer-* group, several new modernize-* checks, and more.

Code assistance for .clang-format files

  • Since v2019.1, CLion has support for ClangFormat as an alternative formatter tool. Now, if you have customized your .clang-format config files in the project, you can benefit from code assistance when you update them.
  • Quick Documentation - To learn about any particular option, call the Quick Documentation popup (Ctrl+Q) and read the original documentation with samples.
  • Schema validation inspection - CLion validates the content of your .clang-format config file against the built-in JSON schema. If the option’s value doesn’t match the allowed value set, a warning will be shown.
  • Code completion - When customizing the .clang-format config file, you can benefit from code completion working for both options and their values.
  • Options description in completion - Code completion popup for option names also includes a short description of the option, so you can quickly check it while typing the option name.

Naming convention

  • New settings - The naming convention settings (Settings | Editor | Code Style | C/C++ | Naming Convention) were reworked to provide better flexibility and more opportunities. New settings like Visibility (Public, Private, or Protected) and Specifier (Const or Static) were added. Also updated the rules to address several kinds of entities at once. It’s possible to work with the new UI without using the mouse.
  • Leading snake case - As requested by CLion users, a new style - Leading_snake_case, which capitalizes only the first letter in the snake_case name, leaving the rest in lower case - is now available, along with the somewhat similar Upper_Snake_Case style and others.

Shell Script plugin

  • If you need to edit shell scripts while you are working on your C++ project, you can do this with CLion as it now bundles the Shell Script plugin.
  • You can benefit from code highlighting, word and path completion, and even textual Rename.

Syntax highlighting for new languages

  • CLion provides bundled profound support not only for C and C++, but also for Python, JavaScript, XML, and more, as well as providing plugins for Rust, Swift, and Kotlin/Native.
  • Have code in your project in other languages, such as PHP, Ruby, or C#? You’ll be happy to learn that syntax highlighting is now available in CLion for over 20 different programming languages!

VCS: Commit from the Local Changes

  • You can now commit directly from Local Changes tab. Just enable the “Commit from the Local Changes without showing a dialog” option at Settings | Version Control | Commit Dialog.
  • Use the Commit shortcut (Ctrl+K) and the IDE will select the modified files for the commit and focus on the Commit message field in the Local Changes tab of the Version Control tool window.
  • Learn more about other VCS changes

Performance improvements

  • The in-place Rename refactoring was reworked to eliminate lags and freezes.
  • The performance of code completion for qualified expressions in the editor has been significantly improved.
  • Collecting compiler information and thus loading the CMake step in remote cases was accelerated by reducing the number of I/O operations.
  • CLion now warns you when Windows Defender is affecting the build performance and is able to automatically exclude directories from real-time scanning.

Rust plugin update

  • Another huge update for the Rust plugin brings a new experimental macro expansion engine. You can turn it on in Settings | Languages & Frameworks | Rust | Expand declarative macros.
  • This engine provides you with code insight features such as highlighting, name resolution, and completion for generated modules and methods from impl blocks. Besides this, it enables navigation in the macro calls.
  • Other changes include a Duplicate code fragments inspection for Rust, and other new quick-fixes and inspections.
CLion Debugger

CLion

A cross-platform IDE for C and C++.

CLion is also available in:

Got a Question?

Live Chat with our JetBrains licensing specialists now.