Clion 2020.3

Posted onby admin

Earlier in September, we began the 2020.3 Early Access Program for CLion which introduces the following enhancements: CTest support An action to set execution point in the debugger Initial portion of MISRA C and C checks Clang completion snippets More Makefile projects support Today the new 2020.3 EAP build for CLion is available! CLion 2021.1.1 Bug-fix 更新现依发布,这是最近发布的 CLion v2021.1 的第一个错误修复更新(build 211.7142.21)。 主要更新内容 修复了导致代码完成速度慢的回归问题(CPP-24744) 修复了编译器信息收集失败并导致代码协助不工作的问题(CPP-24777)。. 2020.3: Enterprise plugin market place drops the port from the plugin download URL: Bug: IDEA-256922: Impossible to enable plugins back after disabling Database Tools and SQL: Bug: IDEA-254315: Description in File Templates does not work any more: Core. Project Settings: Bug: IDEA-256411 'SDK Default' Default project language level is reset. IntelliJ IDEA 2020.3及以下 AppCode 2020.3及以下 CLion 2020.3及以下 DataGrip 2020.3及以下 GoLand 2020.3及以下 PhpStorm 2020.3及以下 PyCharm 2020.3及以下 Rider 2020.3及以下 RubyMine 2020.3及以下 WebStorm 2020.3及以下. Jetbrains2020.3系列及以下永久激活教程: 当前是idea2020.3为例,其它产品同理.

When you need to edit just one file without creating or loading the whole project in CLion, you can use the LightEdit mode.

Keep in mind that the LightEdit mode works as a text-like editor, and it doesn't support the usual IDE editor features such as code completion, or code navigation. However, you can navigate to a specific line of code (Ctrl+G ), fold or unfold parts of code, check, and change file encoding.

Open a file in the LightEdit mode

You can use several ways to open a file in the LightEdit mode.

By default, CLion opens txt and json files in full mode. If you need to open such files in the Light Edit mode, make sure to add the -e prefix as described below.

Open a file from the command line

  • Depending on your OS, open the file from the command line:

    You can find the executable script for running CLion in the installation directory under bin. To use this executable script as the command-line launcher, add it to your system PATH as described in Command-line interface.

    By default, CLion does not provide a command-line launcher. For information about creating a launcher script for CLion, see Command-line interface.

    You can find the executable script for running CLion in the installation directory under bin. To use this executable script as the command-line launcher, add it to your system PATH as described in Command-line interface.

Clion 2020.3

Open and edit a file with the wait switch

You can interrupt a process in the command line and put terminal on hold until you done editing a file in the LightEdit mode. For example, when you work in the command line and run a commit process to Git, you can pause the terminal and use a text editor in the LightEdit mode to quickly write a commit message.

  1. Depending on your OS, open the file adding the -e and --wait commands before the name of your file.

    You can find the executable script for running CLion in the installation directory under bin. To use this executable script as the command-line launcher, add it to your system PATH as described in Command-line interface.

    By default, CLion does not provide a command-line launcher. For information about creating a launcher script for CLion, see Command-line interface.

    You can find the executable script for running CLion in the installation directory under bin. To use this executable script as the command-line launcher, add it to your system PATH as described in Command-line interface.

    CLion opens the file in the LightEdit mode, and displays a notification indicating that the command line is waiting for the opened file to close.

  2. Click one of the notification's options or close the file to release the command line.

Work with code in the LightEdit mode

Clion 2020.3

Even though the LightEdit mode doesn't support all of the CLion editor coding assistance, you can still use basic editing features and basic menu options.

  • Use the main menu to open recent files, show the line numbers, whitespaces, extend the code selection, and so on.

    When you select File Open, CLion opens the Open File or Project dialog where you can quickly navigate to the opened file in the project's root directory. Click the Select opened file icon on the toolbar. Note that for macOS, the native dialog will open.

    When you edit a file, the blue color indication on the tab shows that the file content was changed.

  • When external changes are made to the file you are working on, you can update it by selecting File Reload from Disk from the main menu.

  • Use the context menu for pasting or folding your code as well as switching to column selection mode.

  • Use the status bar to go to the line you need, check the VCS, or toggle the Autosave mode.

Clion ctest

Turn on autosave

  • Click Autosave: off on the Status bar and select the Save changes automatically in the popup that opens.

Exit the LightEdit mode

You can quit the LightEdit mode and switch from editing a single file to working on the entire project. To do so, use one of the following ways:

Status bar

On the status bar of the LightEdit mode, click Access full IDE and from the list of options, select how you want to proceed such as open the current file in the project, open the recent project, or open the new one.

Find action window

Press Alt+Enter and select Open file in project.

Main menu

Select File Open File in Project from the main menu.

Last modified: 25 March 2021
Tips & Tricks

CLion comes with powerful debugger integration, giving you access to backend debuggers such as GDB and LLDB via a uniform UI. The IDE helps you debug efficiently with its built-in variables view, a variety of stepping and breakpoints options, evaluation of expressions, and memory and assembler views.

With CLion 2020.3 EAP, we’ve added a new powerful option to control the execution flow during debugging – Set Execution Point.

You might be aware of this feature if you’ve ever used Set Next Statement in Visual Studio or Jump to Line in IntelliJ IDEA. In brief, it allows you to move the execution during debugging to an arbitrary line of code in the editor.

Set Execution Point

To move around the code when debugging, the following actions were previously available:

  • Step Over (F8) and Step Out (Shift+F8)
  • Step Into (F7) and Smart Step Into (Shift+F7)
  • Run to Cursor (Alt+F9)
  • Force Step Into, Force Run to Cursor, and Force Step Over

We’ve now added a new action – Set Execution Point to Cursor. It becomes available after you start a debugging session, and it allows you to jump to a particular line and set the execution point there, skipping all other commands in between.

There is no default shortcut for the action yet, but you can assign it in the keymap settings. Or you can simply drag and drop the orange arrow from the gutter, inserting the execution point on the desired line. The highlighting will help you select the right execution line you need as you’re dragging the arrow:

Note that you can move the arrow either forward or backward!

Interrupting the control flow

Moving back and forth is easy when the execution graph is linear. But what if the control flow graph is more complicated? With the Set Execution Point action you can:

Clion 2020.3 Activation Code

  • Break loops or restart them.
  • Skip loops completely, including endless loops (code from the loop body won’t be executed in this case).
  • Select another branch in the if-else clause or switch-case statement.

For example, this may be useful if you want to check another branch during the debug session without restarting the whole session:

Note, however, there could be some negative consequences for the program execution when moving the execution point:

  • If you jump over the line at which a variable is initialized, you’ll get the value from the stack/register (which is likely not the value you expect there to be).
  • If the executable code was optimized by the compiler, you might get an unpredictable result or be unable to move the execution point at all.
  • If you jump to another function that is not called in the current control flow graph, the IDE will warn you that the execution might be broken (works for LLDB, and in development for GDB now).
  • There are also known issues like the “multiple candidates exist” error (CPP-21800) and problems with std::cin and std::cout (CPP-22055).

Clion Ctest

Isn’t this feature cool? Try it for yourself and please share your feedback and thoughts here in the comments or in the parent ticket in YouTrack: CPP-9661.

Cli Ide

Your CLion team
JetBrains
The Drive to Develop