CLion 2018.1 EAP: debug on WSL, code folding of the control statements and more
Hi all,
Last week we started CLion 2018.1 EAP. And now it’s time to announce a new build (181.3263.17). No license is required for this build, and you can install it side by side with your stable CLion version.
Debug on WSL
Last time we announced WSL support in CLion, which is an opportunity to use native Linux development toolchain (CMake, C and C++ compilers) when developing on Windows. And now debug on WSL is available! There are some known issues and limitations, so it’s only available under the Registry option for now: cidr.wsl.enableGDB.
Upd. Latest CLion 2018.1 EAP comes with the WSL debugger on by default.
Check the WSL debugger is now available for you in the WSL toolchain:
When you debug your program, it will be run on WSL subsystem with WSL debugger (via the ssh connection).
Known issues and limitations:
- Run to cursor doesn’t work with WSL (CPP-11902)
Code folding of the control statements
Control statements (if
/else
, do
/while
, for
, switch
) can now be folded/expanded via Shift+Ctrl+Period
/Ctrl+=
on Linux/Windows and ⇧⌘.
/⌘+
on macOS. It works for any block with more than one line of code or any block inside the braces:
And more
Other fixes and improvements include:
- Incorrect unreachable code inspection for the catch section of function-level try-catch block is fixed(CPP-3094)
- When analysing try section in the try-catch block, DFA now takes into account that
dynamic_cast
,new
and overloaded operators can throw exceptions (CPP-11594) - An ability to use existing
$VAR
values when specifying environment variables for CMake is added (CPP-3716) - Some performance improvements when including a file via the code completion
Full release notes are available by the link.
Download the build (or wait for a patch update in case you are using previous EAP build), check the improvements and let us know your feedback.
CLion 2017.3.3 bug-fix update
We also are happy to announce another bug-fix update for v2017.3 – CLion 2017.3.3 (build 173.4548.31). It includes the fix for the regression with K&R functions (CPP-6702) and some IntelliJ-platform fixes. Full release notes are available here. Patch update is available from CLion 2017.3.2.
Your CLion Team
JetBrains
The Drive to Develop
Henry Borchers says:
January 31, 2018* Debug on WSL
Dammmmmn! That was fast. Considering how long CLion has had (experimental) MSVC support but with debugging, I was not expecting this so soon. Great job everyone at JetBrains.
Henry Borchers says:
January 31, 2018I meant: “(experimental) MSVC support but WITHOUT debugging”
Anastasia Kazakova says:
January 31, 2018Thanks. It still has issues that require more time, but in general it works.
Axel says:
January 31, 2018Fantastic!
Code Folding for Control statements. It takes a long time to get this “standard” feature in CLion. Thank You!
But, it is possible to enable this folding per default? And implement the vim commands (zc zo etc.) for collapsing/folding this blocks also?
Anastasia Kazakova says:
January 31, 2018I’m not sure about the default folding. However, feel free to create a feature request and elaborate on its need there. As for vim, do you mean some support in the Vim emulation plugin? Then, as well, some request in VIM tracker will be appreciated. Probably, even this one can work: https://youtrack.jetbrains.com/issue/VIM-566
Olof says:
January 31, 2018I don’t have the WSL option in the tool chains window even though I have WSL installed.
I also don’t have an app data folder in my user folder per the description above. That would probably be why I don’t have a WSL option.
long2015 says:
January 31, 2018The windows 10 WSL default is bash.exe, and not Ubuntu.exe. So you must click “download” button to install Ubuntu.exe.
I don’t know what the different between bash.exe and ubuntu.exe, but when I install ubuntu.exe, The WSL toolchains is ok.
Olof says:
February 1, 2018Version 1703 OS Build 15063.786
vasily_romanikhin says:
February 1, 2018You need to update your Windows machine.
CLion works with only stable version of WSL, starting last Fall Creators Update (version 1709, build 16299.15) it’s not beta anymore, “bash.exe” is obsolete. https://blogs.msdn.microsoft.com/commandline/2017/10/11/whats-new-in-wsl-in-windows-10-fall-creators-update/
Olof says:
February 1, 2018It’ll take a while for us to upgrade to 1709 but we’ll get there.
The bigger issue is that we don’t have access to the windows store so if that is the only way to install a supported Linux then I might be up a creek.
Olof says:
February 1, 2018But thank you for your help, I forgot to say.
vasily_romanikhin says:
February 1, 2018Which Windows version/build do you use?
Do you install WSL distributive via the Windows Store?
Olof says:
February 1, 2018Set developer mode, enabled wsl. Opened bash. Said yes to the question to dl from Windows store. So I guess yes.
vasily_romanikhin says:
February 1, 2018As wrote above BashOnWidows is obsolete, you need to update your windows machine, then remove bash.exe running command: “lxrun /uninstall /full” and install WSL distribution via the Windows Store.
Tano says:
February 1, 2018Anastasia, just asking: what framework does CLion use for its GUI? Some Java libraries, Qt, etc?
Because it’s really fantastic and I love the rendering of Consolas font, better than Windows render it and it’s their font! 😀
Roman Popov says:
February 2, 2018It’s standard java swing, afaik. Font rendering on Linux however is not as good 🙁
Tano says:
February 5, 2018I think on the Linux it’s the best font rendering, on Windows it looks very ugly.:)
Ivan says:
February 2, 2018“Code folding of the control statements” doesn’t work! When in
main(){
for(int i=0;i<….){
//here I try both ctrl+. and ctrl+shift+.
}
…..
}
The whole main() gets collapsed! Why there is no "+" to fold region as in all other foldable regions?! What makes folding "control statements" different from oher types of folding. I'll probably never get it…. (why not implement it with custom region? If I weren't lazy I bet I'd write my "Plugin" "Custom fold region adder to control statements" if he Clion developers can't handle to implementation of such an easy (in my view) thing….
Anastasia Kazakova says:
February 2, 2018Where the cursor is located when you try to fold the for body?
Ivan says:
February 3, 2018Oh, I’m sorry, I’ve somehow made it work finally.. It’s so uncomfortable that this type of folding is “apart” from other types.. There’s no “+”: near for() until you fold it first time…
Anastasia Kazakova says:
February 4, 2018Yes, currently there are no gutter marks until you fold for the first time. This is still under discussion. Feel free to comment here: https://youtrack.jetbrains.com/issue/CPP-2906
Dcy says:
February 5, 2018excuse me? can it debug with docker?not wsl.
Anastasia Kazakova says:
February 5, 2018It should work via a remote debug with gdb server.
Alan Lenton says:
February 15, 2018Where can I find the 2017.3.1 and 2017.3.2 updates which I seem to have missed because I wasn’t programming in Linux for a while?
Anastasia Kazakova says:
February 15, 2018The builds are available here: https://www.jetbrains.com/clion/download/previous.html
Or you can update using the update dialog right from the IDE, or via a Toolbox app.
bob says:
June 1, 2018What is the right way to update clion in linux machine? I was asked to downloaded a new Clion. Then what should I do?
Anastasia Kazakova says:
June 3, 2018Which version do you update from and to which one? Usually, we have patch-updates between all consequent updates. But let’s check which versions are you updating.