# How to debug and fix build problems?

**URL:** <https://forums.unrealengine.com/t/how-to-debug-and-fix-build-problems/283687>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** compiling, unreal-engine, building, linking, CPP, question\
**Created:** [May 18, 2014, 10:01pm UTC](https://forums.unrealengine.com/t/how-to-debug-and-fix-build-problems/283687 "2014-05-18T22:01:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![loopzilla](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/loopzilla/32/951305_2.png) [@loopzilla](https://forums.unrealengine.com/u/loopzilla)\
**Post date:** [May 18, 2014, 10:01pm UTC](https://forums.unrealengine.com/t/how-to-debug-and-fix-build-problems/283687/1 "2014-05-18T22:01:19Z")

</div>

Hello,

I’ve wrote small plugin and trying to build game with this plugin.  
I’ve faced with link time problems: unresolved externals etc…

The question is: **How can I debug building process ?**  
I saw files with externsion: Build.cs, and it’s clearly that they are executing during build…  
How can I set breakpoints to these files ? Or see which include paths corresponding to projects, what static libraries are linking etc…  
Because now it’s like a black box - and no way to diagnose build problem…

Thanks in advance,  
Oleksandr “loopzilla” Maniliuk.

---

<div class="post-metadata">

**Author:** ![robert.manuszewski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robert.manuszewski](https://forums.unrealengine.com/u/robert.manuszewski)\
**Post date:** [May 19, 2014, 3:37pm UTC](https://forums.unrealengine.com/t/how-to-debug-and-fix-build-problems/283687/2 "2014-05-19T15:37:14Z")

</div>

Hi, if you have full source code you can just debug UnrealBuildTool with the following command line (right click on UnrealBuildTool project → properties → Debug → Start Options) set in Visual Studio:

```
TargetName Platform Configuration

```

So assuming your game editor target name is MyGameEditor:

```
MyGameEditor Win64 Debug

```

Then just set UnrealBuildTool as your startup project in VS and Debug. All breakpoints set in you build.cs file should just work.

---

<div class="post-metadata">

**Author:** ![loopzilla](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/loopzilla/32/951305_2.png) [@loopzilla](https://forums.unrealengine.com/u/loopzilla)\
**Post date:** [May 20, 2014, 9:36pm UTC](https://forums.unrealengine.com/t/how-to-debug-and-fix-build-problems/283687/3 "2014-05-20T21:36:25Z")

</div>

Thanks for the answer !

But it doesn’t work ☹  
I’ve set UnrealBuildTool of my project as startup,  
chaned command line in Start options to: MyGameEditor Win64 Debug  
Working dir by default is empty…  
Set breakpoints into all funcitons in build.cs files. No breakpoints are trigered during run ☹

Thanks in advance,  
Oleksandr

---

<div class="post-metadata">

**Author:** ![robert.manuszewski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robert.manuszewski](https://forums.unrealengine.com/u/robert.manuszewski)\
**Post date:** [May 21, 2014, 2:30pm UTC](https://forums.unrealengine.com/t/how-to-debug-and-fix-build-problems/283687/4 "2014-05-21T14:30:26Z")

</div>

Does setting any breakpoints inside of UBT work? For example in UnrealBuiltTool.cs, private static int Main(string[] Arguments)?

---

<div class="post-metadata">

**Author:** ![loopzilla](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/loopzilla/32/951305_2.png) [@loopzilla](https://forums.unrealengine.com/u/loopzilla)\
**Post date:** [May 21, 2014, 8:47pm UTC](https://forums.unrealengine.com/t/how-to-debug-and-fix-build-problems/283687/5 "2014-05-21T20:47:36Z")

</div>

Yes, in this file breakpoint works.

---

<div class="post-metadata">

**Author:** ![robert.manuszewski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robert.manuszewski](https://forums.unrealengine.com/u/robert.manuszewski)\
**Post date:** [May 22, 2014, 7:26pm UTC](https://forums.unrealengine.com/t/how-to-debug-and-fix-build-problems/283687/6 "2014-05-22T19:26:17Z")

</div>

Ok, I tried that with a project created from a template ‘basic code’, and there should be one more parameter in that command line (path to the uproj file of the project you want to compile).

MyBasicCodeProjEditor Win64 Development “C:\Users\user.name\Documents\Unreal Projects\MyBasicCodeProj\MyBasicCodeProj.uproject”

I added a brakpoint inside MyBasicCodeProjEditorTarget constructor and it worked fine.

---

<div class="post-metadata">

**Author:** ![loopzilla](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/loopzilla/32/951305_2.png) [@loopzilla](https://forums.unrealengine.com/u/loopzilla)\
**Post date:** [May 23, 2014, 9:27pm UTC](https://forums.unrealengine.com/t/how-to-debug-and-fix-build-problems/283687/7 "2014-05-23T21:27:13Z")

</div>

Thank you,

All works fine - it really helped.

Best regards,  
loopzilla

---

<div class="post-metadata">

**Author:** ![demented\_hedgehog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@demented\_hedgehog](https://forums.unrealengine.com/u/demented_hedgehog)\
**Post date:** [December 8, 2014, 2:21am UTC](https://forums.unrealengine.com/t/how-to-debug-and-fix-build-problems/283687/8 "2014-12-08T02:21:18Z")

</div>

Good. Now how do you do it from the command line on linux?

---

<div class="post-metadata">

**Author:** ![espaghetters](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@espaghetters](https://forums.unrealengine.com/u/espaghetters)\
**Post date:** [June 23, 2018, 10:29am UTC](https://forums.unrealengine.com/t/how-to-debug-and-fix-build-problems/283687/9 "2018-06-23T10:29:29Z")

</div>

Just spent a couple hours wondering why this wasn’t working, so hopefully this helps someone.

You will not be able to debug your project’s `Build.cs` files if your `UnrealBuildTool`'s configuration is set to `Development`. Set it to `Debug` to make sure your project’s symbols get loaded.

The command-line arguments for the `UnrealBuildTool` should match the names of your target files. So for instance, if your game’s name is MyGame and you’re building your server, your configuration is `DebugGame` and your architecture is `Win64`, your arguments would be:

`MyGameServer Win64 DebugGame D:\Path\To\Project\MyGame.uproject`

Hope this helps.
