Hello,
I wonder there is any option to set break point in build.cs file.
Hello,
I wonder there is any option to set break point in build.cs file.
Yes. Here are instructions for VS2019:
** If you generate a VS project using a version of UE4 you installed from the Epic launcher, you wonât have the UnrealBuildTool target.*
Just to note, you donât need a source engine build for this. UBT project and source files are included in launcher builds too, just open Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj in Visual Studio.
Hello I do the same but canât debug my build.cs could anyone help me please?
This is my logs:
âUnrealBuildTool.exeâ (CLR v4.0.30319: DefaultDomain): Loaded âC:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dllâ.
âUnrealBuildTool.exeâ (CLR v4.0.30319: DefaultDomain): Loaded âC:\Program Files\Epic Games\UE_4.24\Engine\Binaries\DotNET\UnrealBuildTool.exeâ. Symbols loaded.
âUnrealBuildTool.exeâ (CLR v4.0.30319: UnrealBuildTool.exe): Loaded âC:\Program Files\Epic Games\UE_4.24\Engine\Binaries\DotNET\DotNETUtilities.dllâ. Symbols loaded.
âUnrealBuildTool.exeâ (CLR v4.0.30319: UnrealBuildTool.exe): Loaded âC:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dllâ.
âUnrealBuildTool.exeâ (CLR v4.0.30319: UnrealBuildTool.exe): Loaded âC:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dllâ.
âUnrealBuildTool.exeâ (CLR v4.0.30319: UnrealBuildTool.exe): Loaded âC:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dllâ.
âUnrealBuildTool.exeâ (CLR v4.0.30319: UnrealBuildTool.exe): Loaded âC:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dllâ.
UEBuildPlatformSDK.PrintSDKInfo: UnrealBuildTool.AndroidPlatformSDK has no valid SDK
UEBuildPlatformSDK.PrintSDKInfo: UnrealBuildTool.IOSPlatformSDK has no valid SDK
UEBuildPlatformSDK.PrintSDKInfo: UnrealBuildTool.LinuxPlatformSDK has no valid SDK
UEBuildPlatformSDK.PrintSDKInfo: UnrealBuildTool.WindowsPlatformSDK using manually installed SDK
BuildMode.Execute: Command line: âC:\Program Files\Epic Games\UE_4.24\Engine\Binaries\DotNET\UnrealBuildTool.exeâ -Target=âTestPLuginEditor Win64 Debugâ
BuildMode.CreateMakefile: Creating makefile for TestPLuginEditor (no existing makefile)
DynamicCompilation.RequiresCompilation: Compiling C:\Program Files\Epic Games\UE_4.24\Engine\Intermediate\Build\BuildRules\UE4Rules.dll: UnrealBuildTool.exe is newer
âUnrealBuildTool.exeâ (CLR v4.0.30319: UnrealBuildTool.exe): Loaded âC:\Program Files\Epic Games\UE_4.24\Engine\Intermediate\Build\BuildRules\UE4Rules.dllâ. Symbols loaded.
DynamicCompilation.RequiresCompilation: Compiling C:\Program Files\Epic Games\UE_4.24\Engine\Intermediate\Build\BuildRules\UE4ProgramRules.dll: UnrealBuildTool.exe is newer
âUnrealBuildTool.exeâ (CLR v4.0.30319: UnrealBuildTool.exe): Loaded âC:\Program Files\Epic Games\UE_4.24\Engine\Intermediate\Build\BuildRules\UE4ProgramRules.dllâ. Symbols loaded.
Exception thrown: âUnrealBuildTool.BuildExceptionâ in UnrealBuildTool.exe
UnrealBuildTool.Main: ERROR: Couldnât find target rules file for target âTestPLuginEditorâ in rules assembly âUE4Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=nullâ.
UnrealBuildTool.Main: Location: C:\Program Files\Epic Games\UE_4.24\Engine\Intermediate\Build\BuildRules\UE4Rules.dll
UnrealBuildTool.Main: Target rules found:
UnrealBuildTool.Main: BuildException: Couldnât find target rules file for target âTestPLuginEditorâ in rules assembly âUE4Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=nullâ.
UnrealBuildTool.Main: Location: C:\Program Files\Epic Games\UE_4.24\Engine\Intermediate\Build\BuildRules\UE4Rules.dll
UnrealBuildTool.Main: Target rules found:
UnrealBuildTool.Main:
UnrealBuildTool.Main: at UnrealBuildTool.RulesAssembly.CreateTargetRules(String TargetName, UnrealTargetPlatform Platform, UnrealTargetConfiguration Configuration, String Architecture, FileReference ProjectFile, CommandLineArguments Arguments) in C:\Program Files\Epic Games\UE_4.24\Engine\Source\Programs\UnrealBuildTool\System\RulesAssembly.cs:line 616
UnrealBuildTool.Main: at UnrealBuildTool.RulesAssembly.CreateTargetRules(String TargetName, UnrealTargetPlatform Platform, UnrealTargetConfiguration Configuration, String Architecture, FileReference ProjectFile, CommandLineArguments Arguments) in C:\Program Files\Epic Games\UE_4.24\Engine\Source\Programs\UnrealBuildTool\System\RulesAssembly.cs:line 617
UnrealBuildTool.Main: at UnrealBuildTool.UEBuildTarget.Create(TargetDescriptor Descriptor, Boolean bSkipRulesCompile, Boolean bUsePrecompiled) in C:\Program Files\Epic Games\UE_4.24\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 612
UnrealBuildTool.Main: at UnrealBuildTool.BuildMode.CreateMakefile(BuildConfiguration BuildConfiguration, TargetDescriptor TargetDescriptor, ISourceFileWorkingSet WorkingSet) in C:\Program Files\Epic Games\UE_4.24\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 433
UnrealBuildTool.Main: at UnrealBuildTool.BuildMode.Build(List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options, FileReference WriteOutdatedActionsFile) in C:\Program Files\Epic Games\UE_4.24\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 220
UnrealBuildTool.Main: at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments) in C:\Program Files\Epic Games\UE_4.24\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 192
UnrealBuildTool.Main: at UnrealBuildTool.UnrealBuildTool.Main(String] ArgumentsArray) in C:\Program Files\Epic Games\UE_4.24\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 520
Should TestPLuginEditor be TestPluginEditor? Not sure if itâs case-sensitive, but thatâs the most obvious thing.
How, exactly how, does one perform this feat? These instructions from Doug_Richardson and kamrann, donât really make sense.
Iâm assuming I have a project all setup. Iâm looking in the project within Visual Studio. Specifically Iâm looking at a xxx.Build.cs file Iâm interested in looking at in the debugger. The âSolution Explorerâ shows myProject with three âfoldersâ: Engine (including /UE4/Source/Programs/UnrealHeaderTool ), Games and Visualizers. There is no way to open up the UnrealHeaderTool from within my existing game Visual Studio instance.
I do see the UnrealBuildTool.csproj file that kamrann refers to, and I can open that project up in a separate Visual Studio window, but I donât understand how to link that to the other instance of Visual Studio.
Iâm confused by instructions #3) Set the Debug arguments on UnrealBuildTool target to a valid build target. For example, I have a target named ShooterGameEditor.Target.cs, so I use -Target=âShooterGameEditor Win64 Debugâ Where do you set those arguments?
I thought I was to use the Visual Studio (my second Visual Studio instance, the one with Unreal Build Tool) â Solution Explorer â Right Click on UnrealBuildTool â Properties â Debug â Start Project, Start Options -Target = "XXX Win64 Debug
, Working Directory = the directory of my game project. Debug start. Total fail â1>CSC : error CS0006: Metadata file âC:\Program Files\Epic Games\UE_4.26\Engine\Source\Programs\DotNETCommon\DotNETUtilities\bin\HPD\Development\DotNETUtilities.dllâ could not be foundâ
Can someone explain? How do I step debug a C# xxx.Build.cs file?
Edit-------------------------------------------------------------------
got it⌠I figured this out from looking at the image that trongcongdn posted. You definitely do NOT want two instances of Visual Studio running. Instead, go to Solution Explorer, right click on empty space, add Existing Project, then point to the location mentioned above by kamrann. When that gets loaded, then update the properties page per what trongcongdn posted. thx to all for the infoâŚ