News

CLion 2016.2 released: Remote GDB debug, Doxygen support, operators generation, and more

As of today, CLion 2016.2 is generally available!

This is our second release of 2016, building on the idea of releasing more often and bringing you the latest features faster. With many new fantastic tools, CLion can help you become a true C++ rockstar:

  • Inspect code more efficiently thanks to improved performance of debugger drivers and the remote GDB debug possibility.
  • Keep your code well-documented with Doxygen support (and thus reduce maintainability costs).
  • Save time on typing, with lots of new code generation options.
  • Work with CMake project model more easily thanks to smart CMake support.

https://www.youtube.com/watch?v=8_-k_IrPPoI


Download CLion 2016.2

Let’s take a closer look at these and other capabilities available in CLion 2016.2.

Debugger performance

GDB and LLDB debugger drivers have been overhauled to improve both correctness and performance. We thank all our users for your collaboration – all your logs, sample projects and use case details finally made this possible!

If you’ve ever run into ‘command timeout’ in CLion, we encourage you to get this build as the problem should be fixed now. Lots of other issues have been fixed as well: ‘Variables’ windows that wasn’t updated on variable setting, problems with showing frames, incorrect debugger exit, and more.

As an important result, debugger performance has seen a huge boost – up to 600x in some cases:
debugger_numbers

The supported GDB version was updated to 7.11 and LLDB updated to 3.8. Besides, Linux users can now benefit from using LLDB (as it was previously available on macOS only).

Remote GDB debug

It’s finally here! One of the most awaited features has finally made its way into CLion. Run an executable on a target machine under gdbserver, connect remotely using CLion remote GDB configuration, and inspect code more powerfully from the IDE’s debugger. Set breakpoints to stop at, evaluate expressions, inspect variables views, change variable values on the fly, and more. For more details about the supported platforms and configuration, see this earlier blog post.
remote_debug

Doxygen support

Documenting code is a best practice that greatly aids code maintenance and support. Now CLion helps you with this by supporting the well-known Doxygen format.

See the Doxygen documentation preview in the Quick Documentation pop-up (Ctrl+Q on Linux/Windows, F1 on macOS), navigate to the function parameters from their description in Doxygen comments, and rely on function and function parameters rename that update Doxygen references automatically:
doxygen_rename

While adding new Doxygen comments to your code base, use Doxygen commands and function parameters completion, or simply generate the stub for Doxygen comments (it will work if your function has parameters, returns a value, or throws an exception):
doxygen_generation

More details on Doxygen support in CLion can be found in this blog post.

Code generation

Saving time on typing is really easy with CLion. The many options of its ‘Generate’ menu (Alt+Insert on Linux/Windows, ⌘N on macOS) have been expanded with equality, relational and stream output operators. Select if you’d like to generate in-place, as class members, use std::tie for the implementation, and more:
operators_generation

Generate definitions (introduced in 2016.1) got updated behavior templates. Now CLion is able to adapt to the patterns you are using in your project. It can detect and support three possible patterns:

  • declarations are located in header files, definitions are in cpp-files;
  • class/struct is located in header file only; or
  • class/struct is located in cpp-file only.

If you switch from one of these patterns to another, CLion will pick up on that and behave accordingly when you use code generation the next time. More on that here.

Another way to save time on typing is the improved Complete Statement feature (Ctrl+Shift+Enter on Linux/Windows, or ⇧⌘⏎ on macOS). It helps you create syntactically correct code constructs by inserting the necessary syntax elements and getting you in position to start typing the next statement. It can complete namespaces, classes, enums, enum classes, structs and control statements:
complete_statement

Learn more about Complete Statement in this earlier blog post.

Code formatting

CLion allows you to configure plenty of code style rules that will be applied on the fly as you type, to help you keep code well-formatted and thus easy to read and maintain. The newest settings fine-tune wrapping for lines after function return type in the scope of a class, in global and namespace scopes, lambda capture list, and in ‘<<‘ and ‘>>’ operators.

Also, the list of predefined code styles has been expanded with LLVM and LLDB styles.

Smart CMake support

We keep working to make CMake easier to use in CLion. 2016.2 adds refactoring support for CMake:

  • Rename (Shift+F6 on Linux/Windows, ⇧F6 on macOS) for users symbols (like functions or macros) – all the usages will be updated accordingly.
  • Safe delete for files – related CMake commands will be updated, and a warning will appear in case of a possibly incorrect command.

To help you become a CMake guru, CLion also offers completion and navigation for user symbols, together with the new Boost-related live templates:
cmake_boost_live_template

If you want your CMake script to detect that it’s being called from CLion ( and if so, set special variables/paths or execute some additional scripts of your choice), you can now do that with the special environment variable, CLION_IDE. Environment variable completion in CMake will make the task even easier:
cmake_env_var_blog

Editor and tool windows improvements

If you a fan of fonts with ligatures (e.g. FiraCode, Hasklig, Monoid or PragmataPro), you’ll be pleased to know that CLion now supports such fonts. Simply go to Editor | Colors & Fonts | Font settings, choose a corresponding font, and select the ‘Enable font ligatures’ option:
ligatures_blog

To spice up your editor’s look, you can now set a custom background image. Use Find Action (Shift+Ctrl+A on Linux/Windows, ⇧⌘A on OS X), type Set Background Image, select an image and configure its settings in the dialog that appears:
background
Note, that you can choose different images for different projects.

If you work with long files, a new alphabetical sorting in Structure View (Alt+7) can come in handy to locate entities quicker (as opposed the reflecting the order in the original file).

Other changes

There’s a lot more in CLion 2016.2:

  • Important improvements in VCS support:
    • Files not yet under version control are now shown in the commit dialog, so you’ll never forget anything important.
    • The Log view for Git and Mercurial loads in the background on every change, so it’s always ready when you need it.
    • Patches can now be applied from the clipboard or by simply dragging them into the IDE. There’s also a Show Diff action to check the changes over your local version, and even a possibility to apply patches to files that were already moved or renamed.
    • Don’t worry about case-only renames in Git for Windows and macOS, as CLion now treats these situations correctly.
  • The Inspection results window makes it easier to preview the corresponding piece of code immediately, apply a quick-fix or disable a group of inspections in-place.
  • The maximum supported version of MinGW-w64 was updated to 5.*, and Cygwin to 2.*.
  • CLion on Windows now bundles a customized JDK version with font-rendering and focus fixes from the JetBrains team.
  • Swift plugin for CLion adds Swift 2.2 support, Introduce Variable refactoring and parameter placeholders for Swift. For more details head to the AppCode site.

To learn more, please visit the What’s new in CLion 2016.2 page on our website.


Download CLion 2016.2

Your CLion Team
JetBrains
The Drive to Develop

image description

Discover more