CLion 2018.1 EAP: structured bindings, breadcrumbs, experimental hexadecimal view

Hi,

The new CLion 2018.1 EAP, build 181.4096.19 is now available! Patch update from the previous EAP build will be available shortly.

This build brings:

Download CLion 2018.1 EAP

C++17: structured bindings

Structured binding introduced in C++17 is a convenient and compact way of binding a list of identifiers to a set of objects. The C++ language engine in CLion is now aware of this feature, thus handles it correctly and ensures more accurate code analysis with less false positives:
structured_bindings

Editor improvements: breadcrumbs for C/C++

While reading the code or navigating through it, it’s good to easily keep track of your location within the code base. Breadcrumbs were created exactly for that type of navigation. These small markers at the bottom of the editor shows your current location inside namespaces, classes, structures, functions, and lambdas. Click on them to navigate to the corresponding code element:
breadcrumbs

Code transformations: Unwrap/remove code blocks

When editing complicated code with lots of nested statements, you sometimes need to accurately remove the enclosing parts. To avoid manual changes (that can break the code by accident), use Code -> Unwrap/Remove… action (Ctrl+Shift+Delete on Linux/Windows, ⌘⇧⌦ on macOS). It suggests the options depending on where your caret is:
unwrap
In CLion for C and C++ you can now unwrap the following control statements: if, else, while, do...while, for, try...catch, or just remove the enclosing statement (for example, when you’d like to extract a part of a ternary operator expression).

WSL: custom paths for CMake, compiler and debugger

We continue our work on WSL support in CLion. In this EAP we’ve addressed an issue with the custom paths to CMake, compiler and debugger executables. You can now provide any custom path to these tools in Build, Execution, Deployment | Toolchains settings for WSL.

Debugger: hex values

We are glad to share that we’ve started working on a top-voted debugger feature: hexadecimal formatting for numerical variables! It’s not there yet, but CLion now shows hex for simple types (int, long, char, etc.). Hexadecimal format for float or double is not yet available. However, we’ll be glad to get your feedback at this stage of development. To enable the feature, turn on cidr.debugger.value.numberFormatting.hex setting in Registry.

  • In Find Action dialog (Shift+Ctrl+A on Linux/Windows, ⇧⌘A on macOS) type Registry; open Registry, type cidr.debugger.value.numberFormatting.hex (or just hex) to search for the setting and turn it on.
  • In Build, Execution, Deployment | Debugger | Data Views | C/C++ settings turn on showing hex values for numbers:
    hex_settings
    The setting is also available from the Debug tool window.

You can now see hexadecimal values in the debug tool window:
hex_run
and in the editor (in Inline Variables View):
hex_editor

Hexadecimal formatting for simple types is available for both debuggers (GDB, LLDB) on all platforms, including remote debug case and WSL.

That’s it! Full release notes are available by the link.

Download CLion 2018.1 EAP

Your CLion Team
JetBrains
The Drive to Develop

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

22 Responses to CLion 2018.1 EAP: structured bindings, breadcrumbs, experimental hexadecimal view

  1. Tano says:

    How can I add custom breadcrumbs? I have a C project and only the last one is shown.
    Thanks.

  2. Henry says:

    Now even more amazing tools that I won’t be able to live without.
    Great job!

  3. Piotr Wera says:

    I don’t know where to ask…
    I am writting CLion plugin, how i can dig into CLion toolchain settings from OpenApi? Thank!

  4. John says:

    When support remote develop toolchain from SSH ?

    • Anastasia Kazakova says:

      WSL was the first step in this direction. So hopefully this year we will come up with some solution.

  5. Roman says:

    But where are binary values? When I want to check which flags are set in CSR, binary values with separators for bytes are more readable then hex.

  6. Roman says:

    Do you plan to work on latency in this release cycle? In my opinion latency is killing auto-completion feature: you never know what will be faster : type method name manually or wait 2-3 seconds until Clion will offer an auto-completion list.

    • singalen says:

      Second that! It’s been a disaster since 2017.

    • Anastasia Kazakova says:

      It’s in progress. Not sure the changes will be merged before the release. There is a huge work in progress started this cycle, but probably we’ll merge to 2018.2, not 2018.1

  7. Mark says:

    Anastasia,

    This is a great start and looking forward to refinements. Couple of comments:

    1) This is a style thing, but I would like an option for the letters in the hex values to be capitalized.

    2) Having all the data view present makes reading a bit clumsy. It would be nice if I can specified how the view is display and only have that show. Being able to right-click on the variable and specify how the data should be view would be great, IMHO.

    3) Is there a reason why “0x” is not same color as the rest of the number? I think it being a consistent color would look better, just seems odd to me.

    Mark

    • Eldar Abusalimov says:

      Mark, thank you for the feedback, we really appreciate that!

      Your suggestions on the value formatting (1 and 3) are in progress now, we’re are going to address that before the feature leaves it’s experimental state.

      We’ll consider your request for selective per-variable formatting when coming up with the roadmap for the next release.

    • Ilya Motornyy says:

      +1

    • Ray says:

      Mark, regarding items 1 & 3, what you describe would comply with convention, but each would slow down the reading of values. Its easier for the mind to distinguish from among lower case letters than capital letters, and its easier for the mind to overlook the 0x prefix when it is a different shade. I believe the UI experts made the right call here.

  8. Thanks for the hex view.
    Now it works much better with my ARM embedded development plugin.
    A new version is released, under review in the plugin repository

  9. Eugene says:

    I love the breadcrumb idea. However, I find it incredibly frustrating that I keep trying to navigate to alternative places from the breadcrumb bar with the mouse, but it’ll only let me navigate within the current tree. I want to be able to right-click a part of a breadcrumb and choose a parallel navigation point from there. For example, if I’m in a class method, then right-clicking on the method should give me the option to go to another method on the class. If I click the class, then right-clicking should have an option to go to another item in the class’ namespace, etc.

    If somehow the functionality is already there and I’m missing it, please let me know :-)

    • Anastasia Kazakova says:

      I guess Structure View (Alt+7 on Linux/Windows, Cmd+7 on macOS) fits your case better. You can turn there auto scroll from/to source.

Leave a Reply

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