CLion 2018.1 EAP: Messages tool window and fixes for ternary operator


A new CLion 2018.1 EAP build (181.3494.7) is available for download. As usual, no license is required for this build, and you can install it side by side with your stable CLion version.

Download CLion 2018.1 EAP

Messages tool window

The general idea behind the change is to make Messages tool window behaviour more flexible and let users decide if the build output is always necessary (and thus should be visible) or it’s only needed if some warnings or errors appear. In the Messages tool window settings you can find two options:

  • Always show on Build: default setting, forces the Messages tool window to stay opened on every build (and open the window if it was closed explicitly).
  • Auto-Hide and Show on Warning/Error: forces to hide Messages tool window on each build if it was opened, then opens it back if warning/error occurs during the compilation, and leaves Messages closed if the build was successful.

If you disable both options, then CLion won’t open Messages tool window unless there’s a warning/error. Thus, if you open/close Messages tool window manually, it will stay in that position.

C++ language support improvements

A bunch of false positives in code analysis related to ternary operator was fixed in this build:

  • Using format specifier ‘%s’ with conditional operator argument results in bogus warnings (CPP-1450)
  • Red code in ternary + new operator (CPP-9526)
  • False positive if std::out is used in the ternary operator (CPP-11499)
  • Initializing a reference from a ternary operator tries to use a constructor (CPP-9889)
  • Wrong “Types are not compatible” error reporting when using function and function pointer in a ternary operator (CPP-7404)
  • The type of ternary operator with “int *” is inferred incorrectly (CPP-3260)
  • And some more

Besides, this build addresses a few UI freezes. Full release notes are available by the link.

Your CLion Team
The Drive to Develop

Posted in Early Access Preview | Tagged , , | 11 Comments

CLion 2018.1 EAP: debug on WSL, code folding of the control statements and more

Hi all,

Last week we started CLion 2018.1 EAP. And now it’s time to announce a new build (181.3263.17). No license is required for this build, and you can install it side by side with your stable CLion version.

Download CLion 2018.1 EAP

Debug on WSL

Last time we announced WSL support in CLion, which is an opportunity to use native Linux development toolchain (CMake, C and C++ compilers) when developing on Windows. And now debug on WSL is available! There are some known issues and limitations, so it’s only available under the Registry option for now: cidr.wsl.enableGDB.

Upd. Latest CLion 2018.1 EAP comes with the WSL debugger on by default.

Check the WSL debugger is now available for you in the WSL toolchain:

When you debug your program, it will be run on WSL subsystem with WSL debugger (via the ssh connection).

Known issues and limitations:

  • Run to cursor doesn’t work with WSL (CPP-11902)

Code folding of the control statements

Control statements (if/else, do/while, for, switch) can now be folded/expanded via Shift+Ctrl+Period/Ctrl+= on Linux/Windows and ⇧⌘./⌘+ on macOS. It works for any block with more than one line of code or any block inside the braces:
Fold statement

And more

Other fixes and improvements include:

  • Incorrect unreachable code inspection for the catch section of function-level try-catch block is fixed(CPP-3094)
  • When analysing try section in the try-catch block, DFA now takes into account that dynamic_cast, new and overloaded operators can throw exceptions (CPP-11594)
  • An ability to use existing $VAR values when specifying environment variables for CMake is added (CPP-3716)
  • Some performance improvements when including a file via the code completion

Full release notes are available by the link.

Download the build (or wait for a patch update in case you are using previous EAP build), check the improvements and let us know your feedback.

CLion 2017.3.3 bug-fix update

We also are happy to announce another bug-fix update for v2017.3 – CLion 2017.3.3 (build 173.4548.31). It includes the fix for the regression with K&R functions (CPP-6702) and some IntelliJ-platform fixes. Full release notes are available here. Patch update is available from CLion 2017.3.2.

Your CLion Team
The Drive to Develop

Posted in Early Access Preview | Tagged , , , | 25 Comments

CLion starts 2018.1 EAP: WSL support, C++17 if with initializer, CMake and project view changes

Hi all,

We are back from our holidays, and it’s time to start CLion 2018.1 EAP!

Our plans for this release are really promising and today we are happy to present to you a couple of great new additions to CLion:

Download CLion 2018.1 EAP

Continue reading

Posted in Announcement, Early Access Preview | Tagged , , , , , | 34 Comments

CLion and Linux toolchain on Windows are now friends!

In this post we’ll discuss how to work with WSL in CLion and how Windows users can benefit from this support.

Why do I need it?

CLion is a cross-platform IDE, that means you can run it on Windows, Linux, and macOS. From the very beginning it works with GCC and Clang compilers, which means on Windows it requires Cygwin or MinGW (or MinGW-w64). Later we introduced Microsoft Visual C++ compiler support, for those users who have it installed and want to use inside CLion on Windows.

Besides, we know that there are C++ developers who have Windows desktops but require Linux toolchain for building their projects. Cygwin could be a work-around. With Windows 10 Microsoft however introduced an even better way – Windows Subsystem for Linux. You simply get the prefered Linux distribution (Ubuntu, OpenSUSE and SLES are supported), configure the WSL and enjoy your new Linux environment in Windows. And now you can benefit from it in CLion!

That means the following is possible:

  • Configure WSL toolchains in CLion on Windows
  • Use CMake, C, and C++ compilers from Linux in CLion running on your Windows machine
  • Debugger support is available
  • Catch memory errors and leaks right from the IDE with the Valgrind Memcheck integration

Continue reading

Posted in Announcement, Early Access Preview, Tips'n'Tricks | Tagged , , , , , | 10 Comments

CLion 2017.3.2 bug-fix update

CLion 2017.3.2, build 173.4301.33, is now available for download. If you’re using CLion 2017.3.1, a patch-update will be available shortly.

Download CLion 2017.3.2

In this update:

  • Ability to pause program output in the terminal (IDEA-140061). This can help when scrolling the output back while the program is still running and producing new lines to the output.
  • Fix for the bundled GDB 8.0 crash on Linux when debugging certain inferiors (CPP-11480).

Full release notes are available by the link.

Your CLion Team

The Drive to Develop

Posted in Announcement | Tagged , | 9 Comments

CLion 2017.3.1 update is available

CLion 2017.3.1, build 173.4127.32, is now available for download. If you’re using CLion 2017.3 or CLion 2017.3.1 EAP, a patch-update will be available shortly.

If you haven’t yet upgraded to CLion 2017.3, good time to do so right now!

Download CLion 2017.3.1

This bug fix update:

  • Brings Catch 2 support
  • Updates bundled CMake to v3.9.6
  • Makes Generate function from usage respect template parameters
  • Fixes a couple of regressions in C++ parser

More details can be found here and the full release notes are available by the link.

Ubuntu users can get this update via snaps:
$sudo snap install clion --classic

Your CLion Team

The Drive to Develop

Posted in Announcement | Tagged , | 1 Comment

C++ Annotated: Sep – Dec 2017

Today we are happy to share our next compilation of C++ news with you.

Subscribe to the regular C++ Annotated and be the first to get the next edition!

C++ Annotated: September – December 2017

This last part of the year 2017 has been full of great conferences and meetups, hot discussions in the committee on C++20, interesting articles, and big releases. And, of course, the biggest news – C++17 is now officially signed and published! 🎉

In this edition:

Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

CLion for Embedded Development Part II


This is a second guest blog post by Ilya Motornyy about programming for microcontrollers in CLion.

CLion for Embedded Development Part I

Upd. An alternative approach from Klaus Nagel in a small demo project on GitHub: Embedded Development on STM32 with CLion and the Segger Tools.

Tell us about your embedded dev and win a prize!

Ilya Motornyy
Ilya Motornyy

Java/JavaScript Developer at
DIY Electronics and Embedded Programming Enthusiast


About one and a half years ago I wrote a blog post about using CLion for embedded software development. Long story short, I used an ST demo board (reflashed into SEGGER JLink-compatible probe), STM32CubeMX code generator, GCC ARM toolchain, and SEGGER Ozone on-chip debugger to run some demonstration project. That combo seems to be a working solution, but, on the other hand, there were some complications with the re-flashing probe, with running an external debugger (why would we run one if we already have awesome CLion?), also there were SEGGER license limitations, etc.

Of course, I wasn’t happy having all of those problems and tried to find better solutions. Now it’s time to show what I’ve managed to achieve. Fortunately, during this time, both CLion and CubeMX were improved a lot, made more stable, and, most importantly, CLion now supports remote GDB. Now it’s possible to use OpenOCD (Open On-Chip-Debugger) as a flash probe and as a remote gdb server. This unlocks the possibility to get rid of both SEGGER license limitations and using a commercial debugger in favor of open-source tools. Also, there is no need anymore to reflash any on-board probes, we can use it as-is, even for flashing your production target devices (refer to ST Nucleo or Discovery board user reference).

I managed to run this environment with vanilla CLion, but the project setup was quite complicated and time-consuming, and at some point, it turned into the idea to write my own plugin for CLion, which puts it all together. Now the plugin is in beta stage, published to the JetBrains plugin repository, and I am glad to show how it works. Today we will run a small demo project (It’s gonna be blinking LEDs! Surprise!) using one of the most popular boards – STM32F4-Discovery. The same example, with minimal changes, can be done using any of STM32 board of Nucleo, Discovery or EVAL series, since they all have LEDs onboard.
Continue reading

Posted in Tips'n'Tricks | Tagged , | 42 Comments

CLion 2017.3.1 EAP

We are glad to announce the start of Early Access Preview for CLion 2017.3.1, a bug-fix update to the recently released major CLion update. Build 173.4127.6 is now available.

Please, note that this EAP build requires an active subscription (or you can start a 30-day evaluation period).

Download CLion 2017.3.1 EAP

Templates in Generate actions

In CLion 2017.3 Generate Definition started respecting function templates. With this update Generate function from usage respects template parameters:

Catch 2

Special icons in the left gutter to run/debug tests appeared in CLion 2017.3. Besides, these icons also report the status of the tests: success or failure. This works for Google Test, Boost.Test and Catch frameworks. And now they are shown for Catch 2, a recently released version of Catch framework.

Other improvements

This build also addresses the following issues:

  • CMake
    • CLion now reports the CMake build progress and shows the stop button, so you can interrupt the CMake build of your project at any time.
    • CLion now bundles CMake 3.9.6
  • C++ language support
    This build mostly addresses regressions appeared after huge overhauls in C++ parser:
    • False “Initializer string is too long for array of chars” error when concatenating string literals (CPP-10787).
    • False “Function … was redefined” error for template function specialization definition, when located in the same file as declaration (CPP-11206).
    • False “No matching constructor” error when template class inherits a constructor (CPP-11292).

Full release notes are here.

Download CLion 2017.3.1 EAP

And finally, Ubuntu users can now use snaps to install CLion (for now use Edge channel where we store our EAP builds):
$sudo snap install clion --classic --edge

To learn about our plans for 2018 and CLion 2018.1 roadmap check this post.

Your CLion Team

The Drive to Develop

Posted in Early Access Preview | Tagged , , , | 12 Comments

What’s next? CLion 2018.1 roadmap


Two weeks ago we released this year’s third big update – CLion 2017.3! It made C++ code analysis more accurate in many areas and added support for MSVC extensions, integrations with Valgrind Memcheck and Boost.Test, and many other improvements and new features.

Now we’re ready to share with you our primary directions for 2018 in general and the roadmap for v2018.1 in particular.
Continue reading

Posted in Announcement | Tagged , , | 40 Comments