CLion 2018.3 released: remote development, CPU profilers, C++17, clangd-based navigation, and VCS and editor improvements

Posted on by Anastasia Kazakova

This year we’ve focused on two areas to enhance CLion. The first is better C++ language support and general IDE performance improvements. As a result, we’ve added a clangd-based experimental complementary language engine, and a massive amount of work was done which, although invisible at first glance, has helped eliminate dozens of UI freezes in the editor.

The second area is the endless world of remote configurations. Starting with Windows Subsystem for Linux (WSL), by the end of the year it has evolved into full remote development support.

Our efforts in both of these areas have culminated in this year’s final major release which is CLion 2018.3. Let’s look at all the goodies it brings with it in more detail!
CLion_183

2018.3 gathers the following changes under one roof:

Grab your free 30-day trial of CLion to evaluate the new features and improvements. Check them out in this quick demo from Phil Nash, or read on for more details:

Download CLion 2018.3

Remote development

You can now develop remotely from a Windows, Linux, or macOS client machine to a Linux remote host. Note there are two major constraints to the configuration for now:

  • It works only for CMake-based projects (CLion also supports Gradle and compilation database project model, but remote development for them is not yet supported).
  • The setup assumes the source code is located on a local machine, which CLion synchronizes using rsync (on macOS and Linux) or sftp and gzip compression (on Windows) to the remote machine. In return, CLion synchronizes the header search paths to the local machine, in order to perform code resolve quicker and keep the editor more responsive while you work with the code.

The configuration is pretty simple – just create a remote toolchain in Settings/Preferences | Build, Execution, Deployment | Toolchains, and use it in the CMake profiles configured for the project (or make this remote toolchain the default one, to use it automatically):
Remote_toolchain

When this is done, you can compile, run, and debug your application or tests on a remote machine right from CLion. Invoke the commands as usual and have them executed remotely:
Remote_run

For more details on how the remote mode works under the hood, read our detailed blog post. Meanwhile, if you are interested in what we are going to concentrate on going forward, please visit our tracker:

  • Open remote CMake project, so the sources are assumed to be stored remotely (CPP-14584)
  • Remote version system control support (CPP-14482)
  • Remote Terminal Support (CPP-14588)
  • Integration with Valgrind Memcheck (CPP-14178), Google sanitizers (CPP-14179), and CPU profilers (CPP-14357) in the remote mode
  • And other requests linked to the parent one on remote development (CPP-744)

CPU Profiler

CLion now integrates with CPU Profiler on Linux (Perf) and macOS (DTrace). A new action for doing this is available in the navigation toolbar, as well as in the run menu that appears when you click the run icon in the left gutter.

It usually takes some time for the profiler to collect the data. When it’s finished, the notification balloon is shown and the information about the application performance analysis is available in the profiler tool window (View | Tool Windows | CPU Profiler). Tabs with the flame chart, call tree, and method lists provide the information divided by threads. Alternatively, you can see the information from all the threads merged, in one place. You can also jump to the source to explore the code that is causing the performance degradation in your app:
Profiler

Would you like to see any other profilers integrated in CLion? Let us know!

C++ Support

Clangd-based engine: now for navigating through your code

One of our key goals is to make CLion accurate and knowledgeable about modern C++ language features. To inch closer to it, this year we’ve released a new complementary language engine based on Clangd, which works in parallel with CLion’s own language engine and helps with some particular editor features. In the current v2018.2, error and warning annotations were implemented based on Clangd.

In CLion 2018.3, some of the navigation and search actions have been moved to the Clangd-based engine, including Go to declaration/definition, highlighting references under the caret, the Quick Documentation Popup, and Find usages. The results we get from Clangd-based engine are still reviewed and adjusted by CLion, so the two engines still work in parallel to give you the most accurate and reasonable results.

To manage which CLion features are based on clangd, go to Settings/Preferences | Languages & Frameworks | C/C++ | Clangd:
Clangd_settings

The error annotator, Clang-Tidy, and navigation via Clangd are all independent from each other, so you can configure a setup that works best for your projects. By default, Clangd is used for all three; to disable it completely, you have to turn off all three options.

By the way, Clang-Tidy (a famous C++ “linter” tool) is based on clang AST and is available in CLion with or without the Clangd-based engine. The main difference is that when enabled via Clangd, it uses the AST cached by Clangd, which improves performance.

C++17: support for fold expressions and deduction guides

Although we are investing a lot of effort in implementing more IDE capabilities on top of the Clangd-based engine, we still continue improving CLion’s own language engine. As adoption of C++17 grows, we’ve added support for C++17 fold expressions and C++17 deduction guides to CLion’s parser. As a result, code highlighting has become more accurate and code assistance is now even better at understanding your code. For example, types can now be inferred correctly in case of user-defined deduction guides:
Deduction_guides

Unit-testing performance improvements

Improving the editor’s performance and eliminating UI freezes was a major area of focus for us in this release cycle. To improve performance, CLion now uses lazy test detection. This reduces project indexing times in many situations, regardless of which testing framework you use – Google Test, Boost.Test or Catch(2). We’ve already heard some very good feedback from our EAP users who said the editor is now much more responsive.

As CLion now detects unit tests in a lazy manner, we’ve added a special action for diagnostic purposes – “Show Test List”, available from the Find Action dialog. It opens a file with the list of all tests currently detected in the project:
Test_list

If you haven’t started any unit tests in your project or haven’t opened any files with the unit tests, you’ll probably get an empty list, as the action itself doesn’t trigger test indexing. But if you have, you’ll get an appropriate list and will be able to check which tests you’ve actually indexed in the project. If you have ideas on how to improve this feature, please share them with us!

New and updated IDE actions

Build/Rebuild

CLion v2018.3 introduces a new Build menu, which gathers all the build/rebuild/install actions available for a particular project model. For compilation database, it’s only Recompile for a single file. But for CMake, there’s much more:
Build_menu
For example, ‘Build Project’ is a new action which builds CMake all target from all CMake Profiles configured for the current project. To build all target from the particular CMake Profile, use ‘Build All in <selected CMake Profile>’.

You can also rebuild the whole project, the selected CMake Profile (all target), or the selected configuration. The full list of available actions can be found in our web help.

Run Anything and Search Everywhere

This pair of universal dialogs improve your productivity while working with the IDE.

Use Double Ctrl to call Run Anything and launch any prefered configuration – simply type in the name. And if you want to debug this configuration – hold down the Shift key, and the dialog will switch to the Debug Anything mode. You can also use it to open a project – type “Open” and select the desired project from the list.
Run_Anything

Double Shift opens the Search Everywhere popup, which now incorporates several actions at once: Go to class, file or symbol; Find an action, or search all of them at once (Search Everywhere). Use Tab to switch between the different actions. All of the previously available specific action shortcuts still work, so for example, Ctrl+N / ⌘O still opens the Classes tab.
Search_Everywhere

Compilation database scheme compliance inspections

CLion 2018.3 comes with an array of inspections for compilation database json files, which are intended to provide checks on compliance with the compilation database JSON schema. For example, it can highlight situations when an incorrect type is used for the property value, or when the property is missing:
Comp_db_checks

VCS enhancements

IntelliJ Platform, which underpins CLion, has recently introduced several important enhancements to how we work with Version Control Systems. First, Git submodules are finally supported! The IDE now ensures that when you clone a root repository, it will clone all the submodules. The same is true for updates, and other VCS actions work with submodules as well.

Another big change is the new GitHub pull requests tool window (VCS | Git | View Pull Requests). It lists all the pull requests to the repository. You can filter the view by pull request state (for example, state:open), assignee, author, etc. Besides, with a simple right click, you can create a new local branch for any pull request.

Check more about VCS enhancements on IntelliJ IDEA What’s New page.

Editor improvements

Multiline TODO

If you want to store more details in your TODO comments, it’s a good idea to split it into several lines. CLion nows handles this correctly – just add an indent starting from the second line of your multiline TODO comment:
Multiline_todo
The IDE will differentiate the lines started with indent from an ordinary comment, and will highlight it as a TODO comment. In addition, the whole comment text will be presented in the TODO tool windows (View | Tool Windows | TODO).

Macro expansion in Quick Documentation

The Quick Documentation popup (Ctrl+Q on Windows/Linux, F1 on macOS) provides an easy way to understand the code that will be substituted after the preprocessor pass. When called on a macro, it shows the final macro replacement.

In v2018.3, the popup is now properly formatted and the keywords are highlighted. This can be really handy, for example, when dealing with boost macros:
Quick_Doc

Accessibility enhancements

A few new settings are available in Settings/Preferences | Appearance & Behavior | Appearance to make CLion (and other IntelliJ-based IDEs) accessible to as many people as possible. One of it is the brand-new High-contrast Theme.

New Plugins UI

We’ve reworked the Settings/Preferences | Plugins page. Its new UI makes it easier to manage, install, uninstall, and update plugins. You can see the most valuable plugins grouped under Featured plugins, or sort all plugins by rating or number of downloads.
plugins_ui

That’s about it! Try these new features by downloading CLion 2018.3 and starting your 30-day free evaluation. By the way, you can use this demo project from GitHub to check out some of the enhancements. Do give us your feedback, too!

Rust and Swift updates

CLion 2018.3 comes with the Swift Package Manager support in the Swift plugin. Simply open the SPM project in CLion and work with it – no additional configuration required. Read more and watch a short demo.

Rust plugin was updated to get partial Rust 2018 support, Move analysis inspection and Cargo unit testing support.

Download CLion 2018.3

Your CLion Team

JetBrains
The Drive to Develop

Comments below can no longer be edited.

67 Responses to CLion 2018.3 released: remote development, CPU profilers, C++17, clangd-based navigation, and VCS and editor improvements

  1. Tano says:

    November 27, 2018

    The CPU profiling is fantastic, although the font is really really small.

    • Tano says:

      November 27, 2018

      And perhaps add a tutorial to read the profiling graphs :)))))))))))) 😀

      • Anastasia Kazakova says:

        November 27, 2018

        We plan to improve the UI in 2019.1. And then probably yes, worth doing so)

        • Tano says:

          November 27, 2018

          Oh gosh….I was afraid of that…perhaps add some way to close quickly the bottom windows (Debug, Run, CMake)…

          CLion has a great UI, I fear that you will change to much…

          • Martin Pecka says:

            November 28, 2018

            Shift+Esc?

  2. Spike says:

    November 27, 2018

    I would like to create a Remote Host Toolchain on Windows but the input-fields where I enter the remote address or the credentials are disabled so in cannot enter anything. Do i need to specify the remote host somewhere else first before i can use it in the Toolchains dialog?

    • Spike says:

      November 27, 2018

      Ok never mind, i figured it out. Although you can’t directly write in the Credentials field and it looks like it’s disabled, you can click the little folder icon on the right to specify the remote host.

      • Anastasia Kazakova says:

        November 27, 2018

        Exactly. That’s how you are supposed to do it, as it has an additional dialog.

  3. Mark Piontek says:

    November 27, 2018

    I just updated Clion from 2018.2 to 2018.3.

    When I want to edit a file, then all characters except return, comma, blank and some other chars are immediately deleted. When I type ‘a’, it appears on the screen for a very short time, then is deleted like it is when I enter a backspace.
    Cut and paste from existing text works.

    • Anastasia Kazakova says:

      November 27, 2018

      Do you have any non-default plugins installed?

      • Anastasia Kazakova says:

        November 27, 2018

        Besides, which platform are you at? Are you using bundled or some other JDK?

  4. Mark Piontek says:

    November 27, 2018

    I am working on Windows 10 with Clion only.

    When I ran into the error, I disabled all non-default plugins, this did have no effect.

    I also renamed the .CLion2018.3 settings directory and started without importing existing settings, this did not solve the problem.

    The problem is not related to my existing projects, when I create a new one,
    the error occurs when I edit main.cpp in the line under “std::cout << "Hello, World!" << std::endl;".

    • Anastasia Kazakova says:

      November 27, 2018

      Could you please put all the details into a new ticket here: https://youtrack.jetbrains.com/issues/IDEA?

    • Anastasia Kazakova says:

      November 27, 2018

      Just in case, try to install 2018.3 in a fresh directory, not inheriting any settings. Will it also have this issue for such a clean installation in your case?

      • Mark Piontek says:

        November 28, 2018

        No, in this case it does not have the issue. At least not with a new project.

        • Anastasia Kazakova says:

          November 28, 2018

          Ok, let us know if you experience any issues with the fresh installation.

  5. Mark Piontek says:

    November 27, 2018

    When I roll back to 2018.2.6 everything is fine.

  6. Rokas Kupstys says:

    November 27, 2018

    Is remote development to a windows/macOS remote hosts planned?

    • Anastasia Kazakova says:

      November 27, 2018

      yes, for the future. Which one do you use? Both?

      • Rokas Kupstys says:

        November 27, 2018

        I would definitely use both, but windows more often.

        Thanks!

        • Anastasia Kazakova says:

          November 27, 2018

          I see, thanks. We’ll keep in mind for the future

  7. Roman says:

    November 27, 2018

    I’ve rolled back to 2018.2.6. 2018.3 is terribly slow in code completion.

  8. Pipo says:

    November 28, 2018

    Hi, Anastasia, the zoom support is lackluster. There are reports in the issue tracker since forever but nothing was done yet. For such a sophisticated IDE it is a shame that zoom support is half-baked.
    See how other editors are doing it. For example Visual Studio 2017, even simpler editor have a more interactive zoom.

    • Anastasia Kazakova says:

      November 28, 2018

      Any issue in particular you mean here? We definitely need to improve it, but currently there are more issues with higher priority and more votes in this direction. So feel free to upvote the problem you care more.

      • Pipo says:

        December 5, 2018

        Issues like these:
        https://youtrack.jetbrains.com/issue/IDEA-158642
        https://youtrack.jetbrains.com/issue/IDEA-137799
        Any other editors I can think of support wheel zoom better since I can remember.

        • Anastasia Kazakova says:

          December 5, 2018

          I’ll pass to the responsible developers to see if we can address this in the upcoming versions. Thanks for pointing.

          • Pipo says:

            December 8, 2018

            Thank you, Anastasia! Hopefully completing this ergonomics feature is easy and gets done sooner.

      • Pipo says:

        December 5, 2018

        What I want to say is that in this age of multiple monitors and often with different resolutions and size this feature matters.

  9. IAROSLAV KIKHTAN says:

    November 28, 2018

    Despite the CLion is better with each release, some issues just prevent us to use it for writing code in it (projects with boost).

    If there is a line in any place in the file which consist overloading vector operators like assert(iter != vector.end() then any text modification hangs syntax analysis for 30 seconds. No highlighting, no navigation no anything for newly typed or pasted code. You must wait about 30 seconds with 100% processor load, then typed/pasted code becomes recognized. All working process looks like typing code without syntax highlighting but with permanent noise from the CPU fan.

    So please make some kind of quickfix/workaround for that.

    Windows
    CLion 2018.2, 2018.3
    With or without clangd
    With or without code inspections

    https://youtrack.jetbrains.com/issue/CPP-12846

    • IAROSLAV KIKHTAN says:

      November 28, 2018

      P.S.
      Compilation of such files takes less then 4 seconds. So there is no a lot of work for clang parser there.

      • Anastasia Kazakova says:

        November 28, 2018

        Thanks for pointing. We’ll recheck that.

  10. Rokas Kupstys says:

    November 28, 2018

    By the way unsubscribing from these comments does not work no matter what option i choose. It is perma-stuck at “all comments” mode. Be great if you could free my mailbox these of notifications. Thanks!

    • Anastasia Kazakova says:

      November 28, 2018

      Which notifications do you mean? I guess WordPress doesn’t send comments notifications.
      But you probably mean a blog post-based email? Have you subscribed by the form on the right of this page? You can unsubscribe here: https://info.jetbrains.com/user-mailing-preferences.html

      • Rokas Kupstys says:

        November 28, 2018

        I ticked “Notify me of followup comments via e-mail. You can also subscribe without commenting.” checkbox under comment reply form and now i get emails for every comment on this post.

        Email has a link “Manage your subscriptions: https://blog.jetbrains.com/clion/comment-subscriptions/?sre=&srk=” but unsubscribing there does not work.

        • Anastasia Kazakova says:

          November 28, 2018

          You probably mean the WordPress settings. Can you make a screenshot just to be sure?

            • Anastasia Kazakova says:

              November 28, 2018

              So what happens after you click Delete?

          • Rokas Kupstys says:

            November 28, 2018

            I am sent to previous page. When i go back to subscription management page it shows no change.

            P.S. your last comment did not have “reply” link either.

            • Anastasia Kazakova says:

              November 28, 2018

              That’s on WordPress side actually. Not sure what’s going on there. Will try to find out if we can reach that settings

  11. Andrei Khokhlov says:

    November 28, 2018

    Thanks for another great release of CLion. Remote Development is an amazing feature! Can we expect that at some point in the future CLion will consider system .ssh/config file (for hostname aliases, gateways etc)?

    • Anastasia Kazakova says:

      November 28, 2018

      Actually, it should be working. Can you provide more details on your case?

      • Andrei says:

        November 28, 2018

        Thank you for your reply.
        I have something like this on my .ssh/config
        Host *hostmask*
        Hostname gateway.hostname.com
        RequestTTY force
        RemoteCommand inline %n

        and then “ssh [ -tt] hostname”

        Doesn’t work for me in CLion 2018.3 – either for OpenSSH config and auth agent, or Key Pair.

        PS: In KeyPair mode browse button on Private Key File edit control does nothing (not opening Browse dialog).

        CLion 2018.3
        Build #CL-183.4284.156, built on November 23, 2018
        JRE: 1.8.0_152-release-1343-b15 x86_64
        JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
        macOS 10.14.1

  12. Henry says:

    November 28, 2018

    Is there a plan for windows CPU profiling in development?

    • Anastasia Kazakova says:

      November 28, 2018

      We definitely have such a plan, however, no particular solutions or estimations planned.

  13. Artur Troian says:

    November 29, 2018

    There is huge regression unfortunately.
    I have 2 toolchains: llvm (default) and arm-none-eabi. After restarting CLion it erases all build profiles under Build, Execution,Deployment->CMake all build configurations

    • Anastasia Kazakova says:

      November 29, 2018

      CMake profiles configurations are per project. So if you open the same project in two CLion versions – should be the same. Is that’s not the case, then need some details. Worth filing a ticket with 2018.2 project settings attached.

  14. Helge Penne says:

    November 29, 2018

    This release seems to be far superior to 2018.1 and 2018.2 for us. The earlier 2018 releases where almost unusable due to frequent freezes, but I’m happy to report that 2018.3 is much better. Thank you. There are still some very annoying freezes to fix, but it is now quite usable.

    Code completion is also better, but still often useless because it is faster to type things out than to wait for CLion. I hope you can keep improving this, because this is still not as good as it needs to be.

    My biggest problem now is that your context resolution is fundamentally broken. It simply is not designed to handle use of multiple build configurations. If the project has libraries then the context selection based on build configuration always fails and defaults to the first build configuration in the list. You have to override for each and every source file when editing, which is quite aggravating. I suspect this also messes up symbol lookup and could be the cause of the slow response for code completion etc.
    See: https://youtrack.jetbrains.com/issue/CPP-13265
    I’m sure there are other related bug reports for this as well.

    Is there any chance of you fixing this in the next release? This is really very important. Lots of projects use multiple build configurations and this will be causing pain to a thousands of users.

    • Anastasia Kazakova says:

      November 29, 2018

      Thank you for your kind words!
      Yes, we do plan to proceed with freezes elimination and performance improvements. Especially we gonna focus on code completion.

      We do agree the resolve context issue is important. We’ll see if we can fit it for the next release.

      • Rokas Kupstys says:

        November 29, 2018

        Code completion is not the only thing though. Switching to related source/header file is extremely frustrating because at times pressing F4 would pop up a modal dialog with progress bar indicating file search. Thing is related file with identical name (except for extension) is in the same folder. It cant be easier, but IDE takes forever to find it. Its faster to find required file in the project tree and open it manually. I understand that sometimes finding related file is not so simple as directory layout may be different, but there should be a fast path for the simple case.

        • Anastasia Kazakova says:

          November 29, 2018

          Go to Related Symbol came from IntelliJ platform and seems doesn’t match the C++ requirements. So we plan to add a proper action to switch between .h/.cpp files in the upcoming 19.1 release.

      • Helge Penne says:

        December 4, 2018

        It would be great if you could do that. One of my projects includes generated code. This means that the problems with context resolution also affects code completion. CLion will automatically choose the wrong context, which means that it will use symbol information parsed from code from the wrong build tree (code which may be old and out of sync with the code in the source tree). Context resolution must be rebuilt to always select the executable and build configuration that the user has selected in the Run Configuration, and must include all libraries used to build that executable.

        Could you point me to the primary YouTrack ticket that you have for this? I would like to provide some input on this if I can. It would be great if I could read this and provide some input from a user perspective, if you will allow that.

        • Anastasia Kazakova says:

          December 4, 2018

          I guess you mean this: https://youtrack.jetbrains.com/issue/CPP-13265

          • Helge Penne says:

            December 4, 2018

            Well, CPP-13265 is not in progress, but it seems like the related CPP-1274 is (which is good news if true):
            https://youtrack.jetbrains.com/issue/CPP-1274

            Do you plan to fix this under CPP-1274 or CPP-13265?

            • Anastasia Kazakova says:

              December 4, 2018

              We seemed to fix CPP-1274, but we’ll give a separate check to CPP-13265 if it’s resolved / could be simply resolved a bit later. So I can’t answer you right now.

  15. Helge Penne says:

    December 3, 2018

    There is a horrible bug in this release that completely locks up the UI and forces me to kill the CLion process:
    https://youtrack.jetbrains.com/issue/CPP-14859

    I’ve had to kill CLion several times today already. This is the worst CLion bug I’ve ever seen. I hope that you can get a fix out for this immediately.

    • Anastasia Kazakova says:

      December 3, 2018

      We are sorry for that. We’ll check it asap and respond to you in the ticket. Follow the updates there.

  16. Charles says:

    December 4, 2018

    It’s still REALLY hard to get python imports working correctly. How can I add a new source folder for python in Clion?

    • Anastasia Kazakova says:

      December 5, 2018

      AS CLion works with CMake, Gradle or compilation database project models only, you need to add Python folder to the corresponding project that using one of these project models. Have you done that?

  17. Mario Lee says:

    December 11, 2018

    remote development should support docker, then everything just like local

    • Mario Lee says:

      December 11, 2018

      docker expose ssh port 22, phusion/baseimage is a better choice.

      • Mario Lee says:

        December 11, 2018

        I tried with docker, but always got error:

        Cannot read /work/test/cmake-build-debug-docker2/CMakeCache.txt

        Clion can not download anything from docker, eg. include folders, or cmake-build-debug-xxx floder

        but I can download everything just use ftp client with the same user.

        you can try everything easily with “docker run -d -p 777:22 –name test_sshd rastasheep/ubuntu-sshd:18.04”

        • Vasily Romanikhin says:

          December 11, 2018

          Have you checked that rsync is installed on your remote-host?
          Also please check the follow ticket https://youtrack.jetbrains.com/issue/CPP-14168, it has workaround(s) for cases which can lead the follow error message.

          • Mario Lee says:

            December 12, 2018

            Wanderful, I installed rsync, and everything is OK!!!

    • Vasily Romanikhin says:

      December 11, 2018

      Here’s the request for docker support https://youtrack.jetbrains.com/issue/CPP-13751.

Subscribe

Subscribe for updates