How Russians use CLion with WSL on Windows 11

Configuring WSL

First they run a VPN client on the host machine and then they go to user’s folder:

cd %UserProfile%

create .wslconfig file with the following content:

[wsl2]
memory=30GB
swap=10GB

networkingMode=mirrored
dnsTunneling=true
autoProxy=true

where memory and swap are required to prevent

cmake build . --parallel

command from being terminated, and the rest of the configuration file is required to use host’s VPN.

After WSL is restarted in PowerShell with

wsl --shutdown

the following command

curl -s https://api.ipify.org

in WSL should show IP address obtained through VPN.

Alternatively they use UI:

Setting up Linux build environment

sudo apt-get update
sudo apt-get install cmake gcc clang gdb build-essential

Installing CLion

After that they download CLion-2025.2.win.zip, extract it to C:\dev\tools\CLion-2025.2.win and run:

IDE starts to download and install:

.idea/ folder appears in ~/dev/repos/hello directory, so I do not know what is hello, probably we do not longer need it.

After that Russians create a project:

set a breakpoint, start a debug session and the breakpoint and enjoy how it successfully triggers:

CLion shows the application output in its console window:

Newly created app folder contains these files:

.idea
cmake-build-debug
CMakeLists.txt
main.cpp

CMakeLists.txt:

cmake_minimum_required(VERSION 4.0)
project(RuApp)

set(CMAKE_CXX_STANDARD 20)

add_executable(RuApp main.cpp)

but our CMake version is 3.28, so it probably uses its own CMake:

2 Responses to How Russians use CLion with WSL on Windows 11

  1. dmitriano says:

    Using WSL toolchains in CLion on Windows
    https://www.youtube.com/watch?v=xnwoCuHeHuY

Leave a Reply to dmitriano Cancel reply

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