On Linux and macOS platforms CLion integrates with Valgrind Memcheck to help you detect memory errors.
It lets you run targets with Valgrind Memcheck and then get the results in a special tab in the Run tool window. Users can run both regular targets and unit tests targets with Memcheck.
Valgrind is also available on Windows with WSL toolchain.
To detect addressability issues, memory leaks, data races, and uninitialized memory issues on Linux and macOS, use Google Sanitizers integration in CLion.
In case you use Clang >= 3.8.0 or GCC >= 5.0.0, when you run/debug your application or
-fsanitize compilation flag, CLion visualizes the sanitizers
in a "Sanitizer" tab in the run tool window. It allows you to review the list of errors
their traces in the IDE, navigate to sources, preview the sources or inspect the frame
CLion integrates with CPU Profiler on Linux (Perf) and macOS (DTrace).
You can run the profiler right from the IDE and review the analysis results in a dedicated tool window (View | Tool Windows | CPU Profiler).
Use the flame chart, call tree and method lists to get a better overview of the possible performance issues in your code. Navigate to the source code to locate the issues in the code base.
If you’ve ever asked the question, “Was this statement executed during the configuration run?”, that means you are looking for statements coverage measuring for your code. CLion has it thanks to the integration with llvm-cov/gcov tools.
You can get it for unit tests run or a regular configuration run. The results are available in the Coverage tool window or via a color indication in the editor’s left gutter.Learn more