I am a newbie to CLion
I found that CLion has support for Docker. I want to do the following:
(Refer my Linux OS as A.)
(Refer the docker container within A as B.)
The library and environments are set up in B.
The CLion IDE is running in A.
I want to code/debug the program that runs in B using the IDE in A.
Is this the functionality that CLion supports? I read their documents, but I can't find a way to achieve it
Thanks
As of CLion 2021.3 EAP there is a built in Docker Toolchain.
Taken directly from the CLion blog post:
- Go to Settings/Preferences | Build, Execution, Deployment | Toolchains.
- Add a new toolchain, select Docker type.
- Create a docker server and select it in the toolchain settings.
- Select one of the available Docker images.
Now you can create CMake profiles using this Docker toolchain:
Check the full blog post for more details and tips on how to set up and optimize the docker toolchain on different platforms!
It may be not very regular way to do it, but you can actually run a CLion itself inside a docker container. This may be useful if parsing your codebase requires some libraries which you have only in docker but not on your system (I did it to work with ROS). Also you don't need to mess with "remote developement" long loading and syncing time, also debugger works "out of the box".
Example of such setup may be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With