How to use Clang and VScode for UE?

Hi everyone, i am a new beginer for UE, i am using UE 5.2.1 now.

I hope that i can use Clang to compile C++ scripts instead installing VS2022.

I have installed Clang in my windows system, and added the path to my enviroment path. However, I donot know how to use Clang in UE. I received the warning like: There is no compiler. To use C++ templete, you need to install VS2022.

I have added configuration in BuildConfiguration.xml as follows:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
    <WindowsPlatform>
        <Compiler>Clang</Compiler>
    </WindowsPlatform>
</Configuration>

but it does not work. What should I do next? Very thanks!

in order to compile C++ code for the engine, or just your project, you need to utilize code injection by virtue of the Unreal Head Tool, and Unreal Build Tool, and this is functionality that is well outside of Clang without a lot of hand holding.

there is documentation for how to setup VSCode here: Setting Up Visual Studio Code for Unreal Engine | Unreal Engine 5.5 Documentation | Epic Developer Community

as for “not wanting to use VS2022” you do not need the full version of VS2022 (the enterprise install) you can utilize the VS 2022 Community Visual Studio 2022 Community Edition – Download Latest Free Version which is free to use (as long as you/your organization have made less then 1 Million USD in the last calendar year), and you get the majority of functionality of the Full Visual Studio (including the numerous recent improvements targeted directly toward Unreal Engine developers)