how debug UBT in mixed mode(.NET + native)?

Hi Epic,

i am debugging UBT and UBA to learn the distribute compile system, but i can not switch debug mode from Auto to Midxed in VS 2022 like normal .NET program,

i want to debug code from UBT(.NET) and UBA(native) in the same process

how to solve this problem?

[Image Removed]

[Image Removed]

Hello,

Have you tried using the UBT solution? Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.sln

You can install UnrealVS to make it easier to manage the launch arguments. https://dev.epicgames.com/documentation/en\-us/unreal\-engine/using\-the\-unrealvs\-extension\-for\-unreal\-engine\-cplusplus\-projects

Regards,

Martin

can not switch debug mode

[Image Removed]

Can you make sure that the PDB for UbaHost is copied in the same folder than the DLL? Engine\Source\Programs\UnrealBuildTool\bin\Debug\runtimes\win-x64\native\UbaHost.pdb

You should see the pdb being loaded in the Modules panel if it’s found.

[Image Removed]

You should also make sure that the debug launch profile is set to allow for native debugging. In the UnrealBuildTool’s project properties (Alt+Enter):

[Image Removed]

There is some inlining going on so you might not be able to step in all the code but I can debug the UBAHost DLL with that setup.

Regards,

Martin

thank you, works well

another question for debug UBA, how UBA communicate between process?

in host(request build), the ​HandleListDirectory is called by remote message from ubt or other one,

but i can not find who send ListDirectoryMessage, the only code define ListDirectoryMessage is HandleListDirectory

[Image Removed]

I was made aware of this article that discusses debugging UBA: https://dev.epicgames.com/community/learning/knowledge\-base/jB32/unreal\-engine\-practical\-debugging\-tips\-for\-unreal\-build\-accelerator

There is also this presentation that discusses UBA: https://youtu.be/ZUlwqNbYWBQ?list\=PLZlv\_N0\_O1gb0rxbHfn2t\-\-7jO2gADVNT\&t\=1960

Those should help you understand how UBA works and how to debug it.

Regards,

the commit [e604d53] takes no effect for detour crash.

i did a little mod to UBAExecutor.cs, when run cmd.exe with Link.bat for linux target, set enableDetour to false,

this can avoid the problem

​

Can you share the link to the commit that you are referring to?

[[UBA] · EpicGames/UnrealEngine@e604d53](https://github.com/EpicGames/UnrealEngine/commit/e604d530935a9025da72fbb968a24f5c71bf2e3b)

[UBA assert during build of Linux CrashReportClient after Windows Update [Content removed]