# Can't debug unreal engine source code

**URL:** <https://forums.unrealengine.com/t/cant-debug-unreal-engine-source-code/325539>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [July 16, 2015, 8:38pm UTC](https://forums.unrealengine.com/t/cant-debug-unreal-engine-source-code/325539 "2015-07-16T20:38:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0d53d466](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0d53d466](https://forums.unrealengine.com/u/anonymous_user_0d53d466)\
**Post date:** [July 16, 2015, 8:38pm UTC](https://forums.unrealengine.com/t/cant-debug-unreal-engine-source-code/325539/1 "2015-07-16T20:38:24Z")

</div>

I have my configuration on debug editor and I’m trying to go through my code line by line from my breakpoint. Everytime I run the code it opens up my project but visual studios never stays in debug mode. I don’t know how to make it stay in debug mode so that I can see what line is crashing my program. Do I have it on the right configuration?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0d53d466](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0d53d466](https://forums.unrealengine.com/u/anonymous_user_0d53d466)\
**Post date:** [July 17, 2015, 7:55pm UTC](https://forums.unrealengine.com/t/cant-debug-unreal-engine-source-code/325539/2 "2015-07-17T19:55:28Z")

</div>

In order to debug you must go to your properties in UE4 project then Configuration Properties-\>Debugging-\>Command Arguments. In front of the " -debug" put the absolute path to your .uproject that you want to debug with. If any of your folder names have space please put your path within quotes.  
This should allow you to debug your engine source code

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0b7eaa0d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0b7eaa0d](https://forums.unrealengine.com/u/anonymous_user_0b7eaa0d)\
**Post date:** [December 4, 2020, 8:58pm UTC](https://forums.unrealengine.com/t/cant-debug-unreal-engine-source-code/325539/3 "2020-12-04T20:58:46Z")

</div>

If using Rider:

In Rider Select target “Debug Editor | Win64”

In Rider goto Run, Edit Configurations…

Add the full path to the uproject file (use quotes if spaces) followed by the “-debug” flag  
Now launch as usual using F5, breakpoints will become active in the project and engine

e.g. F:\UE\XBZ\XBZTGasSandbox\XBZTGasSandbox.uproject -debug

 ![323949-debugproject.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/f/e/6fef394c6d731ab22272bea3cbd16248cb4a50b0.png)

References:

[https://docs.unrealengine.com/en-US/Basics/RunningUnrealEngine/index.html](https://docs.unrealengine.com/en-US/Basics/RunningUnrealEngine/index.html)

> **[Command-Line Arguments](https://docs.unrealengine.com/5.2/en-US/command-line-arguments-in-unreal-engine/)**
>
> Arguments that you can pass to an engine executable to customize how the engine runs on startup.

> **[Build Configurations Reference](https://docs.unrealengine.com/5.2/en-US/build-configurations-reference-for-unreal-engine/)**
>
> Reference guide for solution and project build configurations.
