What's New in CLion 2019.2: A Smart Cross-Platform IDE for C and C++
CLion is a powerful and intelligent integrated development environment (IDE) for C and C++ developers. It supports cross-platform development on Windows, Linux, and macOS, and provides a rich set of features to help you write high-quality code faster and easier.
In this article, we'll take a look at some of the new features and improvements that CLion 2019.2 brings to the table. Whether you're working on embedded projects, debugging with Microsoft Visual C++ toolchain, or simply looking for a better coding experience, CLion 2019.2 has something for you.
Embedded Development Support
One of the most exciting additions in CLion 2019.2 is the support for embedded development. CLion now integrates with OpenOCD and STM32CubeMX to help you create, build, debug, and run embedded applications on STM32 boards.
You can use CLion's project wizard to generate a project based on STM32CubeMX configuration files, or import an existing project created with STM32CubeMX or STM32CubeIDE. CLion will automatically detect the board type, target device, and toolchain settings.
Once you have your project set up, you can use CLion's powerful code editor to write your code with smart code completion, navigation, refactorings, inspections, and more. You can also use CLion's embedded terminal to run commands or scripts on your board.
When it comes to debugging, CLion makes it easy to connect to your board via OpenOCD and start a debugging session. You can use CLion's graphical debugger to set breakpoints, step through your code, inspect variables, watch expressions, evaluate expressions, and more. You can also use CLion's memory view to examine the memory contents of your board.
Experimental Debugger for Microsoft Visual C++ Toolchain
Another major improvement in CLion 2019.2 is the experimental debugger for the Microsoft Visual C++ toolchain. This means that you can now use CLion to debug your applications built with MSVC on Windows.
To enable this feature, you need to install the Windows 10 SDK and enable the experimental debugger in CLion's settings. Then you can use CLion's project wizard to create a new project with MSVC as the toolchain, or open an existing project that uses MSVC.
Once you have your project ready, you can use CLion's graphical debugger to debug your application as usual. You can also use CLion's disassembly view to see the assembly code corresponding to your source code.
Besides the embedded development support and the experimental debugger for MSVC, CLion 2019.2 also brings many other enhancements to make your coding experience better. Here are some of them:
A fully-reworked Unused Includes check that helps you remove unnecessary #include directives from your code.
A new ClangFormat-based formatter that allows you to apply different formatting styles to different parts of your code.
A new Code Coverage tool that shows you how much of your code is covered by tests.
A new Change Signature refactoring that lets you modify the signature of a function or method in one place.
A new Rename File refactoring that renames a file and updates all its usages in one go.
A new Extract Superclass refactoring that extracts common members from a class into a superclass.
A new Inline Variable refactoring that replaces a variable with its initializer expression.
A new Introduce Using Alias refactoring that introduces a using alias for a type or namespace.
A new Introduce Typedef refactoring that introduces a typedef for a type.
A new Inline Typedef refactoring that replaces a typedef with its underlying type.
A new Introduce Namespace refactoring that introduces a namespace for a set of declarations.
A new Inline Namespace refactoring that replaces a namespace with its contents.
Improved code completion for CMake files.
Improved code analysis for C++20 features. aa16f39245