CLion 2016.2 EAP: debugger bug fixes and performance enhancements
This week brings a very important CLion 2016.2 EAP (build 162.844.13), as it contains big changes introduced inside CLion’s debugger. We’ve already made a couple of attempts to fix ‘command time out’ and other problems there, but issues still exist and are constantly reported by our users. We’d like to thank you for all the reports and logs you’ve sent. Your collaboration made it finally possible to introduce major changes in GDB and LLDB drivers.
Here’s what to expect from this build.
Sometimes an error would occur while collecting frames on breakpoint/interrupt or when the debugger was being launched. The debugging session would hang for some time and then a command timeout was reported to the user. Now a proper error message is reported to the console and in a notification balloon, so the ‘command timeout’ error shouldn’t bother you anymore.
We overhauled debugger drivers, making it possible to fix many bugs with stepping and variables views, for example:
- Value in “Variables” window wasn’t updated after the variable was set (CPP-5933).
- Debugger failed to show frame variables when stepping into a function if const STL container was in outer frame (CPP-6150).
- GDB didn’t exit correctly when program waited on
- LLDB didn’t stop on breakpoints on case-insensitive file system if there were differences in file names/paths casing (CPP-6598).
GDB and LLDB versions updated
We’ve also updated the bundled LLDB version (OS X only) to 3.8 and the GDB version to 7.11. Along with supported GDB version update, the maximum supported version of MinGW-w64 was updated to 5.3 and Cygwin to 2.5.
After all changes in both drivers, we ran performance tests to evaluate how they affected debugging startup/shutdown, stepping with various data views and expanding big data structures. The numbers are really promising (the picture shows the correlation between new and old data):
Besides, there were a few tests which finished with the TIMEOUT previously, while now they take some reasonable time to complete, like for example displaying strings or STL collections.
CMake and Safe delete
Since the very first releases, when you add a new file, CLion has suggested updating the CMake targets with the newly created file. However, this automatic update was not possible in case of file deletion. Now it is!
If you delete a file listed as an argument in certain CMake commands, CLion will search for file usages in CMakeLists.txt files, warn you about an unsafe operation, and update the usages automatically. These CMake commands include:
- set_source_files_properties, and
Note that if there are other files listed in the command arguments, CLion will simply delete the reference to the deleted file:
However, if the reference to the deleted file is the only command argument, deleting the reference (as well as the command itself) could lead to an incorrect CMake file, so this warning will be shown. You can then view the usages and decide if you’d like to proceed with deleting:
It works not only for C and C++ files, but for any file type (list resources for example, or other CMake scripts). Directories are not currently supported.
We’ve updated Boost-related live templates for CMake files and now there are two – boost and boost_with_libs. The latter is for linking your target with the Boost libraries. You only need to fill the components list and the target name:
When we first introduced the Generate definition action some users were confused by its behavior. That’s why we’ve collected all the feedback and considered the cases carefully once again. In general, there are several popular behavior templates:
- declarations are located in header files, definitions are in .cpp files,
- class/struct is located in a header file only,
- class/struct is located in a .cpp file only,
- as well as any other custom case users might be interested in.
CLion now detects the case automatically, providing Generate in-place setting in the generate dialog:
- It’s always unchecked when the action is called outside a class or a namespace.
- When called inside a class or a namespace:
- Unchecked if there are existing functions in the class with outside definitions.
- Checked if there are no functions in the class or all the functions are in-place.
- Unchecked if there are no functions in the class, the class is in a header file and there is a corresponding source file (unless it’s a template).
You can use this Generate in-place setting to control the behavior:
Font ligatures are officially supported by the IntelliJ-based IDEs now, and so does CLion. If you have a font that supports ligatures installed (e.g. FiraCode, Hasklig, Monoid or PragmataPro), then simply go to Preferences/Settings | Editor | Colors & Fonts | Font, choose a corresponding font there and select the Enable font ligatures option. That’s it!
There are a few more nice changes:
- IDE’s notifications are now more friendly – there appear in the rightmost bottom corner and are grouped by the subsystem.
- If you’d like to have a nice background image in your editor, it’s now possible in CLion. Call Find Action (
⇧⌘Aon OS X), type Set Background Image, select an image and configure its settings in the dialog that appears:
- Git/Mercurial log viewer now loads in the background on every change (a commit, fetch, rebase, etc.) to be always ready when you open it.
As usual, the full release notes are available here.
We encourage you to try the build and let us know about any issues, particularly those affecting the debugger. If you experienced performance problems before, please share if you see any enhancements with the current build.
Your CLion Team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
CLion 2023.3 EAP2: Support for Device Tree Files and Meson
The CLion 2023.3 Early Access Program has just started, featuring assembly view for files, enhanced C++ data flow analysis, and other updates. The CLion 2023.3 EAP2 build is ready for you to try! With it, you can finally start working on Meson projects in CLion and benefit from device tree format s…
The CLion 2023.3 Early Access Program Is Open
We recently shared our preliminary plans for v2023.3, which we plan to release at the end of November. We are now happy to announce that the CLion 2023.3 Early Access Program (EAP) starts today! Our EAP lets the community participate in discussions devoted to our products and influence the developm…
CLion 2023.2 Release Candidate
CLion 2023.2 is on its way, while the release candidate for v2023.2 is already available! To install CLion 2023.2 RC (build 232.8660.139), download it from the website, update via the Toolbox App, or use this snap package (for Ubuntu). Please note, you need an active subscription or a trial lice…
CLion 2023.2 Goes Beta
The Beta version of CLion 2023.2 is now available with the key improvements and changes that are expected in the upcoming release. Download build 232.8660.49 from our website, via the Toolbox App, or as a snap package (for Ubuntu). DOWNLOAD CLION 2023.2 BETA Text search in Search Everywhere Searc…