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.
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:
During stepping, if you have memory view opened, CLion will highlight the memory changes that happen in the selected memory piece:
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:
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:
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.
Your CLion Team
JetBrains
The Drive to Develop