Learn CLion

Step-by-step tutorials, helpful hints from product experts, and useful videos designed to help you get the most out of CLion.

Useful shortcuts

  • Ctrl + Shift + A
    Find any Action in the IDE
  • Alt + Insert
    Generate code
  • Double Shift
    Search Everywhere
  • Alt + Enter
    Show intention actions and quick-fixes
  • Alt + F7
    Find usages
  • Ctrl + Shift + A
    Find any Action in the IDE
  • Alt + Enter
    Show intention actions and quick-fixes
  • Alt + Insert
    Generate code
  • Alt + F7
    Find usages
  • Double Shift
    Search Everywhere

CLion in action

CLion Essentials

What does it mean to be productive when developing in C++? Are there tricks my IDE can teach me to make C++ coding a bit easier? Learn a trick or two from this demo!

Contents:
00:00:00 - Live Templates
00:00:21 - Surround-with Templates
00:00:36 - Auto import
00:01:05 - Extract Variable
00:01:29 - Create new Live Template
00:02:21 - Code Analysis
00:02:45 - Block commenting
00:02:51 - Multiple cursors
00:03:09 - Find / Replace & Find in Path / Replace in Path
00:03:25 - Search Everywhere & Find Action
00:03:51 - Local History

To learn more visit our site: http://www.jetbrains.com/clion

Join us:
Website: https://jb.gg/rtr7lm
Blog: https://jb.gg/b56itn
Twitter: https://twitter.com/clion_ide

Category: Tips&Tricks

#CLion #CPP #JetBrains
04:32
CLion Tips & Tricks for Hyperproductivity
11.06.2020
Are you worried that learning to be productive with a complex tool like CLion requires a significant investment of time and energy? You might be surprised how much you can get done with just a handful of simple shortcuts. One of them even makes it easy to find any other commands and actions you might need. We'll look at what it takes to navigate code like a pro, find and fix code issues on the fly, and how to refactor and even generate code.

Demo by Phil Nash
Developer Advocate at JetBrains, author of Catch/Catch2, co-host of cpp.chat, host of C++ London, chair and organiser of C++ on Sea.

00:00 - Intro
00:48 - Project models intro
01:23 - Create New Class
02:09 - Rename
03:30 - Auto-import
04:10 - Code generation: generate constructor
05:10 - Clang-Tidy
05:51 - Code generation: operator generation
07:08 - Navigation through the code
08:10 - Search Everywhere
09:40 - Find Action
10:50 - Reformat Code
11:19 - Local History
12:30 - Questions time

https://www.jetbrains.com/clion/
13:40
Supercharge Your Productivity with Just a Few Easy CLion Tricks
18.09.2020
#CLion is a cross-platform IDE for C and C++ development.

CLion knows your code through and through and takes care of the routine while you focus on the important things. Check this video to see it in action.

To learn more visit our site: http://www.jetbrains.com/clion

Category: Tips&Tricks

#C #CPP
09:36
CLion Quick Tour
29.03.2017
Are you new to #CLion or have you been wanting to try it out? Then this webinar is for you!

From a standing start, we'll get you not just up and running with CLion, but get you super productive right away – and set you on the path to hyper-productivity!

We cover installation, finding your way around the UI, the fastest way to access any action in the application, and how to set things up the way you like them. We then see how you can use CLion to full advantage as an ongoing assistant for your code, showing you where you might have gone wrong – and even how to fix it! We’ll also show how you can navigate huge and complex codebases like a pro, and even get CLion to write or refactor code for you.

Agenda:
00:00 - Intro
01:42 – Installation & Initial setup, configuring toolchains
14:43 – Create a New Project, Build and Run
17:11 – Toolbox App
18:30 – Windows setup, configuring the toolchains on windows
24:25 – macOS toolchains setup
28:00 – IDE settings and customizations
34:50 – Coding assistance with CLion (create a new C++ class, auto-import)
38:46 – Clang-Tidy code checks
39:56 – Code generation with CLion
46:16 – Navigation through the types and subtypes, Implement function, Introduce Variable, Extract Function, Inline Function, Surround With templates.
49:30 – Navigation through complex code bases with CLion; IDE actions, and the fastest way to access them
53:10 – VCS and Local history
54:51 – Questions

Join us:
Download CLion: https://jb.gg/jovord
Website: https://jb.gg/lm393d
Blog: https://jb.gg/k8x7oq
Twitter: http://twitter.com/clion_ide/

About the Presenter:
Phil Nash is the author of the C++ test framework, Catch2, and composable command line parser, Clara. As Developer Advocate at JetBrains he's involved with CLion, AppCode and ReSharper C++. More generally he's an advocate for good testing practices, TDD and using the type system and functional techniques to reduce complexity and increase correctness. He's previously worked in Finance and Mobile as well as an independent consultant and coach specialising in TDD on iOS.

Category: Webinar

#C #CPP #webinar
01:05:21
CLion 101 and Beyond
25.06.2020
CLion exposes the full power of GDB and/ or LLDB (even on Windows, where we have built an MSVC compatible debugger on top of LLDB), and even builds on it with more features, in an easy – and fast – to use way. We’ve prepared a couple of videos to give a tour of CLion’s debugging features. The first one covers the fundamentals that everyone should be familiar with.

00:00 - Intro
00:20 - Toolchain configuration
00:30 - Toolchain on Windows
00:39 - Set a breakpoint
01:30 - Start a debugging session
02:20 - Examine a state of a program
03:25 - Inline Variable View
03:35 - Stepping through the code
04:15 - Force Step actions
04:46 - Catching exceptions in debugger
05:48 - Summary

Learn more: https://www.jetbrains.com/lp/clion-debugging/
Get CLion: https://www.jetbrains.com/clion/download
Free 30-day trial is available.

#Debug #CPP #Breakpoint
06:41
CLion Debugger Fundamentals
16.10.2020
CLion exposes the full power of GDB and/ or LLDB (even on Windows, where we have built an MSVC compatible debugger on top of LLDB), and even builds on it with more features, in an easy – and fast – to use way. We’ve prepared a couple of videos to give a tour of CLion’s debugging features.

In this part, we'll look at setting, muting and inspecting variables, evaluating expressions, adding watches, interactive inline hints (which was added since the previous video), hex and memory views, and the peripherals view for embedded devices.

00:00 - Intro
00:43 - Setting variables
01:12 - Mute variables
01:44 - Inspect variable
02:00 - Evaluate Expressions
03:24 - Watches
03:48 - Jump to source
04:05 - Interactive Inline 
04:23 - Hex view
04:56 - Memory view
06:06 - Peripherals view for embedded devices

Learn more: https://www.jetbrains.com/lp/clion-debugging/
Get CLion: https://www.jetbrains.com/clion/download​
Free 30-day trial is available.

#Debug #CPP #MemoryView
07:25
CLion Debugger - Beyond the Basics - Part 1: Suspended
24.03.2021
CLion exposes the full power of GDB and/ or LLDB (even on Windows, where we have built an MSVC compatible debugger on top of LLDB), and even builds on it with more features, in an easy – and fast – to use way. We’ve prepared a couple of videos to give a tour of CLion’s debugging features.

This part focuses on the dynamic part of working with breakpoints, watchpoints and setting the execution point.

00:00 - Intro
00:19 - Advanced breakpoints
01:28 - Non-suspending breakpoints
03:44 - Exception breakpoints
04:41 - Watchpoints
06:02 - Set Execution Point

Learn more: https://www.jetbrains.com/lp/clion-debugging/
Get CLion: https://www.jetbrains.com/clion/download​
Free 30-day trial is available.

#Debug #CPP #Watchpoint
07:29
CLion Debugging - Beyond the Basics - Part 2: Dynamic
29.03.2021
CLion exposes the full power of GDB and/ or LLDB (even on Windows, where we have built an MSVC compatible debugger on top of LLDB), and even builds on it with more features, in an easy – and fast – to use way. We’ve prepared a couple of videos to give a tour of CLion’s debugging features.

In this video we start by looking a direct access to the GDB or LLDB, then look at attaching to external processes and debugging on remote machines. We also look at debugging core dumps and running the debugger with root privileges.

00:00 Intro
00:25 GDB and LLDB as backends
01:41 .gdbinit/.lldbinit
02:50 Debug with Root/Admin privileges
03:50 Elevation service
04:49 Debug the process that is already running (attach to process)
06:46 Attaching to process running on other machine
10:20 Other remote debug options
10:51 Core dumps debugging

Learn more: https://www.jetbrains.com/lp/clion-debugging/
Get CLion: https://www.jetbrains.com/clion/download​
Free 30-day trial is available.

#Debug #CPP #RemoteDebug #RemoteDevelopment #CoreDump
12:44
CLion Debugging – Beyond the Basics – Part 3: Beyond Local
04.05.2021
Extract… refactorings are generally useful when you want to introduce more flexibility to your code and reuse some code blocks. Check out this short demo we’ve recorded which covers Extract Function, Extract Parameter, Extract Lambda Parameter, and Live Templates in CLion.

Learn more about refactorings in CLion: https://www.jetbrains.com/help/clion/refactoring-source-code.html
https://www.jetbrains.com/clion
04:25
Extract Refactorings in Action
12.11.2020
In this webinar, we took a look at some of the remote development topologies that developers work with, explaining how CLion supports them.

Agenda:
00:00 - Intro
01:06 - Intro with all the topologies briefly explained
07:53 - Remote GDB debug sample
11:30 - Remote GDB debug configuration
15:37 - Raspberry Pi demo: remote GDB debug
21:21 - Full Remote Development
26:00 - Raspberry Pi demo: full remote mode
29:50 - WSL case
32:30 - Q&A

Learn more about CLion at https://www.jetbrains.com/clion

Category: Webinars
41:35
Remote Development with CLion
04.03.2019
Windows Subsystem for Linux (WSL) is a compatibility layer for running Linux binary executables natively on Windows 10. CLion 2018.1 allows Windows users to configure and use WSL toolchains (which means CMake, C, and C++ compilers; debugger is not yet available and planned for the future).

Learn more about CLion at https://www.jetbrains.com/clion/ 
Follow our blog to read more on WSL support: https://blog.jetbrains.com/clion

Category: Tips&Tricks
03:11
Using WSL toolchains in CLion on Windows
24.01.2018
CLion is a cross-platform IDE for C and C++ development. CLion 1.5 is going to come with Python support plugin. Read more in our blog: http://blog.jetbrains.com/clion/2016/01/python-support-in-clion/

To learn more about CLion visit our site: http://www.jetbrains.com/clion

Category: TipsOtherLanguages
04:34
Python plugin in CLion
20.01.2016
This screencast demonstrates how you can adjust CLion's editor to match your preferences, and how various editor settings and features help you customize the way you work.

To learn more visit our site: www.jetbrains.com/clion

Category: Tips&Tricks
07:10
CLion Editor Basics
20.02.2015
Welcome to CLion! This is our new cross-platform IDE for C and C++ development. This video shows Google Test support in CLion (available since CLion 1.2).

To learn more visit our site: http://www.jetbrains.com/clion

Category: Tips&Tricks
05:46
Google Test support in CLion
23.10.2015
Welcome to CLion! This is our new cross-platform IDE for C and C++ development. In this demo we'll give you a short overview of the CMake support in CLion.

To learn more visit our site: www.jetbrains.com/clion

Category: Tips&Tricks
07:13
CMake support in CLion
10.04.2015
Since the early days of CLion, CMake has been the IDE’s primary project model. In 2021.2, this support has had a massive update in order to keep it aligned with the ongoing CMake evolution.

00:00 Intro
00:20 CMake 3.20
01:10 CMake Presets
05:34 New CMake Project templates
06:51 CMake Targets as Before Launch tasks

Read on for more details and give it a try: https://www.jetbrains.com/clion/whatsnew/

Category: WhatsNew
08:51
CMake Support in CLion 2021.2
28.07.2021
To quickly find what you are looking for and dig into the code CLion comes with a set of navigation and search features that will help you find your way through any code no matter how tangled it is. Watch this screencast to learn about these features.

To learn more visit our site: www.jetbrains.com/clion

Category: Tips&Tricks
06:12
CLion search and navigation
03.03.2015
Welcome to CLion! This is our new cross-platform IDE for C and C++ development. In this video you can watch CLion’s refactorings in action.

To learn more visit our site: http://www.jetbrains.com/clion

Category: Tips&Tricks
10:03
Refactorings in CLion
11.12.2014
Tracking down bugs is one of the most time-consuming parts of a developer's job. To help users of CLion, Undo has partnered with JetBrains to bring its next generation debugging technology to the IDE.

In this webinar we look at how CLion makes debugging easier out of the box – then see how Undo's award-winning reversible debugging technology allows developers to step backwards as well as forwards inside their program to find the root cause of a failure.

Phil's demo project: https://github.com/philsquared/Catch

Agenda:
0:44 - Fundamental CLion debugging topics
1:24 - Getting orientated with debugging in CLion
4:20 - Stepping, viewing and watching variables and expressions
8:21 - Breakpoints, conditions, dependent breakpoints and logging
14:57 - Reversible Debugging in CLion with Undo, intro from Greg Law
21:50 - Undo demo
33:35 - Advanced CLion debugging topics: attach to local process
36:16 - Advanced CLion debugging topics: remote GDB debug

Learn more about CLion at https://www.jetbrains.com/clion
Read about CLion and Undo: https://blog.jetbrains.com/clion/2016/09/undo-for-clion/
Live Recorder by Undo: http://undo.io/products/live-recorder/

Category: Webinars
44:10
Debugging C/C++ Applications on Linux in CLion: From Basics to Reverse Debug
07.12.2016
This webinar recording provides an introduction to developing large C/C++ projects using the package modularization and reuse offered by Conan package manager, and the power and convenience of the CLion IDE, using the CMake build system. 

It will be demonstrated how to consume existing packages of popular C and C++ libraries like Poco, Boost, OpenSSL and ZLib, easily from the CLion environment. Then, how to create package will be explained, with a special focus on continuous development of packages from your own, evolving source code.

Demo project: https://github.com/drodri/clion_conan

Agenda:
00:37 - Consuming existing packages of OSS libraries Boost, Poco, etc
10:10 - How to create packages from your own source code
15:30 - Conan profile
19:30 - Totally skipping the local cache to depend on a locally edited package
43:00 - Questions

Learn more about CLion at https://www.jetbrains.com/clion
Learn about Conan at: https://www.conan.io/

Category: Webinars
53:50
Developing C/C++ Projects with CLion IDE and Conan C/C++ Package Manager
13.07.2017
The recording of the CLion Ask Me Anything session. 2 hours, 9 speakers, 7 demos, and 140+ questions. The team covered the evolution of the C++ language engines in CLion, IDE performance tips, Makefiles prototype demo, Debugger Tips & Tricks demo, Remote development in CLion and setting a project inside Docker container for remote development, working with the Arduino boards in CLion demo, and other questions.

Agenda:
00:00 - Intro
02:29 - The evolution of the language engines in CLion.
05:16 - Handling preprocessor code.
09:00 - Plans for Qt support.
15:30 - Code analysis tools in CLion, how to add support for more, and if/when CLion will support the C++ Code Guidelines rules.
18:57 - What are the plans for C++20 support?
19:55 - Does the CLion team participate in the C++ Committee Meetings and what are your goals there?
22:04 - CLion performance tips
27:08 - Makefiles prototype demo.
34:36 - Other project models (Meson, Bazel). What are the plans? How to workaround via the compilation database?
42:24 - Debugger Tips & Tricks demo.
52:13 - How to limit the debugger to “just my code”?
56:22 - CLion plans for CUDA debugger, reverse debugging, and cross-language debug.
01:02:01 - Remote development with CLion – short demo.
01:10:48 - Setting a project inside Docker container for remote development.
01:20:18 - What are the plans for more native Docker support? What are the plans for optimizing performance of the remote development features in CLion?
01:23:45 - A short demo of working with the Arduino boards in CLion.
01:34:55 - What about improvements to debugging experience for the embedded targets, for example viewing the peripherals?
01:38:25 - Working with CTest in CLion
01:46:21 - General questions and final links.

About the Presenters:
- Dmitry Kozhevnikov (CLion Team Lead) and Ivan Donchevskii (Developer): C++ Support, C++ Language Engines, IDE Performance
- Semyon Kolton (Developer): Project Models
- Eldar Abusalimov (Developer): Debugger
- Vasily Romanikhin (Developer): Remote Development in CLion
- Ilia Motornyi (Developer): Embedded Development in CLion
- Alexey Utkin (Developer): Unit Testing, Formatting
- Anastasia Kazakova (C++ Tools PMM)
- Phil Nash (C++ Tools Developer Advocate)

Join us:
Download: https://jb.gg/b0eknx
Website: https://jb.gg/eddmx2
Blog: https://jb.gg/aqb541
Twitter: https://twitter.com/clion_ide

#clion #jetbrains #ama #webinar

Category: Webinars
01:51:48
CLion Ask Me Anything Session
14.05.2020
The demo shows how one can use CLion to develop/debug audio plugins.

https://blog.jetbrains.com/clion/2017/11/clion-2017-3-eap-code-generation-improvements-juce-support-and-more/#juce

Learn more about CLion at www.jetbrains.com/clion
Get JUCE 5.2 and Projucer with CMake exporter at https://juce.com/releases/juce-5-2

Category: Tips&Tricks
02:19
Develop audio applications in CLion
08.11.2017
Learn about CLion and AppCode features useful for server-side Swift development:

- 00:00 HTML
- 00:44 JavaScript
- 01:20 Markdown
- 01:40 Handlebars/Mustache
- 02:00 Databases
- 02:46 Docker
- 03:23 Remote Hosts
- 04:24 Testing requests

Read more here https://blog.jetbrains.com/objc/2018/10/server-side-swift-clion-appcode/

Category: TipsOtherLanguages
05:16
Server-side Swift in CLion
29.10.2018
macOS:
    - Import SPM project: 00:00
    - Code assistance in Package.swift 00:17
    - Code assistance 00:44
    - Run, Debug, Test 02:39
    - Run Configurations 03:33
Linux:
    - Import SPM project 03:44
    - Code assistance in Package.swift 03:56
    - Code assistance 04:17
    - Run, Debug, Test 05:49

Read more here http://blog.jetbrains.com/objc/2018/10/spm-support-clion/

Category: TipsOtherLanguages
06:21
Swift Package Manager support in CLion
04.10.2018
This tutorial shows how to set up a project in CLion for ESP32 development on Windows, covering all the necessary steps in great detail. Starting from downloading and installing the esp-idf development framework, we’ll take a closer look at how esp-idf uses specific environment variables and a dedicated Python environment to compile programs.

We’ll create a new CLion project from one of the esp-idf examples and adjust the project settings so that CLion knows about all of the underlying esp-idf dependencies. With the correct project settings, we will close the tutorial by demonstrating some of CLion’s code-insight features and show how to compile, flash, and monitor programs for your ESP32 board directly from within the IDE.

00:00 Intro
00:21 Preparations and initial installations
02:42 Setting up a project in CLion
06:39 Code insight in CLion
08:02 Flashing and monitoring your ESP-32 chip

Learn more:
Download CLion: https://www.jetbrains.com/clion/download
esp-idf GitHub repository: https://github.com/espressif/esp-idf
CLion documentation on embedded development: https://www.jetbrains.com/help/clion/embedded-overview.html
10:25
Developing for ESP32 With CLion on Windows
10.09.2021
In this video, we show how to use CLion together with a PEmicro Multilink debug probe in order to develop, build and debug code on an ARM-based microcontroller. For this example, our target device will be a BluePill with a STM32F103 ARM Cortex M3 microcontroller, and we will be implementing "Blinky", i.e. making an LED blink.

We show how to install the required software, connect the hardware, configure and generate the project, create a run configuration in CLion, and finally build and run the code.

00:00 Intro
00:15 Our setup and hardware
01:51 Installing the software
03:32 Connecting hardware
05:05 Configuring and generating project
06:10 Open the project in CLion
06:32 Writing "blinky" code
07:32 Creating run configuration
08:12 Building and running the code
08:31 Useful links

Useful links:
PEmicro Multilink debug probes: https://www.pemicro.com/
STM32CubeMX code generator: https://www.st.com/en/development-tools/stm32cubemx.html
Installing toolchain: https://www.jetbrains.com/help/clion/embedded-overview.html#toolchains
Installing custom gdbserver: https://www.jetbrains.com/help/clion/embedded-gdb-server.html#pemicro
08:56
Using a PEmicro Multilink debug probe with CLion in order to develop on an ARM-based microcontroller
26.10.2022
In this video, we’re going to talk about the new Docker integration in CLion.

00:00 Intro
00:20 Preparing Docker with an `alpine` image
01:07 Creating Docker toolchain in CLion
03:40 Docker toolchain on Windows
04:32 WSL2 backend to run Docker
05:35 Docker plug-in

Learn more and download your free 30-day trial: https://www.jetbrains.com/clion/

#Docker #Toolchain
06:11
Docker integration in CLion
01.12.2021
In this video, we are going to go through the different toolchain options available in CLion for Windows.

00:00 Intro
00:25 Bundled MinGW
01:21 Visual Studio toolchain with MSVC and Clang-cl
03:31 Working with Windows Subsystem for Linux (WSL) in CLion
04:24 Cygwin
05:20 System toolchain (new in 2021.3!)
06:16 Remote toolchain
08:59 Docker toolchain

Learn more and download your free 30-day trial: https://www.jetbrains.com/clion/

New remote development mode (headless remote machine and thin local client): https://blog.jetbrains.com/clion/2021/11/clion-2021-3-remote-debugger-docker/#beta_remote_dev
Docker toolchains in CLion: https://www.youtube.com/watch?v=p7Bi-mOyelM

#Windows #Toolchain #Compiler
09:48
Windows Toolchains in CLion
01.12.2021
In this video, we show how CLion’s parameter hints and type hints help with reading and understanding C++ code, using a practical example. Parameter hints give the developer useful additional information about function calls, while type hints show deduced types in many different contexts. We show the various available features and configuration options that will help you work more effectively with hints in CLion.

00:00 Intro
00:19 Sample application
01:12 Parameter hints
02:30 Emplace_back example. Hints for non-const references.
03:07 Disabling parameter hints and Exclude List
04:01 Type hints for deduced types
04:44 Type hints for structured bindings
04:55 Type hints for templates
05:09 Type hints for functions with auto return type
05:27 Type hints in lambdas
05:56 Settings

Learn more about parameter hints (https://www.jetbrains.com/help/clion/parameter-hints.html) and type hints (https://www.jetbrains.com/help/clion/type-hints.html).

Download a free 30-day trial: https://www.jetbrains.com/clion/download

#Cpp #Editor #Parameters #Types
06:17
Parameter hints and type hints in CLion
20.01.2022
In this webinar, JetBrains developer advocates Matt Ellis and Timur Doumler show five different ways to do remote development in C++ using the CLion IDE. First, we show the "thin client" approach with the brand new JetBrains Gateway. We then compare this to the older method of remote development with local sources and point out the differences. After that, we look at CLion’s custom toolchains for developing on WSL and Docker containers. Then, we dive into remote debugging, where we make a Raspberry Pi blink an LED and discuss the difference between “Remote Debug” and “Remote GDB Server” modes. Finally, we show how to collaborate remotely using Code With Me.

00:00 Introduction
05:00 Remote development with Gateway
20:45 Remote development with local sources
32:00 Containers and virtual machines: WSL
36:22 Containers and virtual machines: Docker
43:29 Making Raspberry Pi blink an LED by debugging remotely from CLion
56:11 Code With Me, collaborative editing (Matt now blinks an LED on Timur’s Raspberry Pi!)
01:07:55 Recap of the options, comparison table
01:11:36 Back to remote development with Gateway
01:14:14 Q&A and wrap-up
01:26:33
5 Approaches to Remote C++ Development With CLion
26.07.2022
When debugging C or C++ code in CLion, you can explore the underlying assembly code. To open the disassembly view, right-click a frame in the debugger tab and select Disassemble. This opens the disassembly view side-by-side with your source code and highlights the current execution line in both. You can freely switch between debugging in the C/C++ and assembly views and step through lines of code or instructions. Both views follow each other while debugging. Disassemble on demand works for both Intel and ARM assembly, and it also works when using remote debugging, like for embedded development.

Learn more: https://www.jetbrains.com/help/clion/disassembly-view.html
01:47
How To Debug C++ Code Efficiently: Disassemble On Demand
12.04.2023

Latest blog posts

Useful Posts on X

Check out C/C++ tools
from JetBrains

Pick up the right tool for C and C++ development depending on your preferred toolchains and other requirements

Learn more