CLion 2023.1 EAP4: Terminal Emulation and Clangd-Based Indexer
The new CLion 2023.1 EAP build (231.6890.13) is available from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu). Update via patch if you are using the previous EAP build.
Terminal emulation in CLion
If you develop curses or ncurses applications in CLion, you previously ran into issues with running and debugging them in the IDE. The terminal emulator was not able to run in curses mode and instead you got an “Error opening terminal: unknown” message. (CPP-822)
This issue is now fixed for a wide range of use cases! For example:
Starting from this EAP build, CLion emulates the terminal in the output console. This behavior is enabled by default and is controlled by Settings/Preferences | Advanced Settings | Run/Debug | Emulate terminal in the output console.
The availability of terminal emulation depends on:
- Whether it’s being used for running or debugging, and whether GDB or LLDB is used for debugging.
- Whether there is an input redirection to the file.
- Whether the running process is elevated (being run with administrator rights).
- Whether you’re using local, remote, Docker, or WSL toolchains.
- Whether you’re using it on a Windows, Linux, or macOS platform.
Terminal emulation mostly works for Unix-based systems and local toolchains. Generally, it doesn’t work on Windows except for running the application locally. You can find the detailed table showing each case here. When emulation is not working, the terminal switches silently to the old behavior.
CLion has been working with two language engines for a while already: an original language engine written in Java and Kotlin, and a newer Clangd-based engine maintained by our team. There are many features in CLion powered by the Clangd-based engine, like code completion, MISRA checks and data flow analysis, code hints, and others. We also expect it to improve the performance of features that we will migrate to Clangd from our original language engine.
Find Usages, however, is still powered by the original language engine. We’ve seen a few issues in the current approach:
- The Find Usages action is not accurate when looking for constructors which can be used for implicit conversion and for implicit conversion operators.
- The performance of the Find Usages action might not be satisfactory in some cases.
We are ready to address both issues with the preview of our Clangd indexer!
To give it a try, enable the indexer in Settings/Preferences | Advanced Settings | Clangd | Use Clangd-based indexer:
After you enable it and restart the IDE, a round-ball indicator will appear in the status bar. It has 3 states:
- Green means the indexer is ready. After the index is built, searches are instant, no matter how many usages of a symbol there are in the project. This is especially noticeable with symbols that are used across the whole project, or with operators (like =,+,-,*, etc.), because they are usually used almost everywhere.
- Yellow means an indexer update is in progress.
- Grey means the indexer is paused.
If you click on the indexer indicator, two actions are available:
- Clear caches and rebuild can help in the event that something goes wrong and the indexer seems to be broken.
- Pause can help if you’d like to stop the indexer and free the CPU and memory it’s using.
This is a work in progress, so we’d love to know if the Clangd-based indexer helps you and in which cases it does! Let us know in the comments below. The known issues include:
- Indexer doesn’t work for WSL toolchain (CPP-32070).
- All usages are incorrectly treated as Read usages (CPP-32018).
- No usages are found for the
- No usages are found in lambdas (CPP-32038).
- No File Structure in the Find Usage view (CPP-32093).
- Usages include results from system headers (CPP-32016).
You can now filter files in the Coverage view to focus on recently updated files when testing. By default, you’ll see a list of files with uncommitted changes.
Other fixes in this EAP build include:
- CMake v3.25 is now bundled.
- Fixes have been implemented for the Docker toolchain (CPP-29883, CPP-30341).
- Project tabs in the new UI on macOS were implemented. When you have several projects open, you can now easily switch between them using project tabs displayed under the main toolbar.
The full release notes are here.
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.2 Bug-Fix Update
The CLion bug-fix update 2023.2.2 is now available! The fixes included in this bug-fix update are listed below. Download build 232.9921.42 from our website, through the Toolbox App, as a snap package for Ubuntu, or via a patch from inside the IDE. DOWNLOAD CLION This update’s main highlights includ…
CLion 2023.2.1 Bug-Fix Update
The CLion bug-fix update 2023.2.1 is now available! If you haven’t yet upgraded to v2023.2, now is definitely a good time to do so! The key enhancements in the major 2023.2 update include: The Beta version of AI Assistant is now available as a plugin with limited access. Streamlined integratio…