CLion 2019.1 EAP: memory view and header guards style

Hi,

Introducing the new CLion 2019.1 EAP, build 191.6014.11! You can get it from our website, Toolbox App, or through a snap package (if you are using Ubuntu). The patches will be available shortly for those of you who are using the previous EAP build.

DOWNLOAD CLION 2019.1 EAP

Memory View

Hex view has been available in the debugger for a while already in the experimental mode (controlled by Registry cidr.debugger.value.numberFormatting.hex option and turned off by default). Now it’s time to introduce Memory View!

Memory View dumps the memory behind the pointer in the Debug mode. To invoke it, select a pointer variable in the debugger’s variables view and press Ctrl+Enter on Windows/Linux or ⌘Enter on macOS:
memory_view

During stepping, if you have memory view opened, CLion will highlight the memory changes that happen in the selected memory piece:
memory_view_stepping

We are still working on Memory View (including UI) and will be glad to listen to your feedback here in comments!

Header Guard style

We’ve recently added the naming conventions for C/C++ to CLion, and now we’ve also included the ability to configure the header guards style there. Go to Settings/Preferences | Editor | Code Style | C/C++ to check the default template:
header_guard

In this template you can use predefined variables such as ${PROJECT_NAME}, ${PROJECT_REL_PATH}, ${FILE_NAME}, ${EXT} (file extension), and predefined variables from Settings/Preferences | Editor | File and Code Templates | Files tab, such as ${USER} or ${DATE}. It also supports Apache Velocity syntax. Alternatively, you can select the style from one of the predefined schemes (Google, LLVM, Qt, GNU, etc.).

This style will be used by CLion when creating a new header file. But there’s even more! Now, when you rename the file, the header guards matching the currently configured style will be updated with the new name if needed:
memory_view

Besides all this, a few code highlighting issues (when Clangd was used) were addressed, and the regression with an unexpected swapping of include headers after completion (CPP-15283) was fixed.

That’s it. The full release notes are here.

DOWNLOAD CLION 2019.1 EAP

Your CLion Team
JetBrains
The Drive to Develop

This entry was posted in Announcement, Early Access Preview and tagged , , , , , , . Bookmark the permalink.

6 Responses to CLion 2019.1 EAP: memory view and header guards style

  1. Paul Belanger says:

    It would be nice if there was an option to use #pragma once instead of header guards as well.

    • Anastasia Kazakova says:

      You can do that: go to Settings/Preferences | Editor | File and Code Templates, find C/C++ header templates there and change header guards to pragma.

  2. Jason says:

    For me the biggest drawback of Clion is stability and speed, where for a large project, debug may hang and time out; debug stepping is slow compared with Eclipse; indexing takes a long time; memory consumption is huge; even simple editing may sometimes hang. And Clion appears to be walking down that path further with no intention of fixing it, which is a pity and may soon drive users to other options such as VScode or back to Eclipse.

    • Anastasia Kazakova says:

      I’m sorry you feel that way about the product. But performance and stability are our top priorities and we keep constant work in that direction, improving this step by step. If you meet such problems in your environment, it would be more effective if you point to particular issues in the issues tracker, so that I can check their state and share our plans on them.

  3. Christian says:

    Why can’t i explore the memory view manually and why can’t i show a local variable in memory view? I wish Clion’s debugger support would be as good as eclipse’s :/ otherwise Clion is a great IDE but it lacks debugging support.

    Also it would be nice to have a disassembly view that you can explorer as you wish, i.e. next to your c++ code you have the disassembled view so you can check what asm code was produced by the corresponding c++ code (of course this will not work pretty well with -O2 -O3 or even -O1 but it still is a very valuable information).

    All in all i like the update but i am still hoping for better debug support and faster autocomplete which takes ~1 second for large header files on my machine (quadcore i7).

    • Anastasia Kazakova says:

      By explore manually, do you mean getting memory view by entering a particular address into some UI?
      Local variable – works, if it’s a pointer. We’ll later add other cases.

      Disassemble on demand is planned for the future releases.

      Completion speed-up is also planned, but it’s worth sharing a CPU snapshot with us for the case when it takes 1 sec.

Leave a Reply

Your email address will not be published. Required fields are marked *