What exactly is the difference between development and debug?

I’ve downloaded UE4’s source code from github and I’ve built the engine using the “Development Editor” solution configuration option. Now I know what official unreal documentation says about these configurations (For reference, click here). Debug adds debugging information to the engine as well as to the game and development is basically like release. All the docs say about the development configuration is that with it you are still allowed to modify your game (or engine with the source code) and see those changes reflected in the editor. However, I can also still run an instance of the development configuration with visual studio’s debugger and step through the code just as I would be able to with the debug option. My question is then what exactly is the difference between the debug and development solution configuration options in UE4? Do both still contain debug information (.PDB files) but debug just contains more?

1 Like

Wonderful! thanks for the insight. Quick question: Do you develop mostly in development editor for faster compile times?

You are right on the money. Debug contains a lot more diagnostics code, and a lot of runtime optimizations are disabled. An example would be a check statement.

check(false);

In development this code would simply output “A breakpoint has been triggered…blah blah” and take you to the offending file where the check statement is. In debug it will give a good stack trace to see what got you there.

I believe you can step through code in release as well, not just development and debug. As long as you are running through Visual Studio it will attach a debugger and you can step through code. Once you package and bake your project through the editor you will no longer be able to step through it since no debugger is attached.

It is possible to attach a debugger to the baked product in order to perform telemetry, but you won’t get as much useful information as you would if you were running through development or debug in an unbaked, unpackaged project.

I always develop using the Development Editor settings, so perhaps somebody who actively codes with Debug can give you a better explanation.

3 Likes

Nope. I don’t even know why I don’t develop using Debug. Most of the time when the application crashes I have a general idea of what I did wrong because I use ensure and check way more than I should be and I always step through my code whenever there is an issue.

A lot of developers, especially newer ones, are unaware that the PRAGMA_DISABLE_OPTIMIZATION and PRAGMA_ENABLE_OPTIMIZATION macros exist and that you can place a breakpoint and step through your code, seeing the exact values of everything. It took me almost 8 months before somebody pointed out to me that these features existed. Now I use them multiple times on a daily basis.

I guess what I’m trying to say is that there is no reason for me to use Debug. Development reveals enough information for me to properly debug my application (even if it takes longer). I’m pretty keen when it comes to code optimization, but when it comes to workflow optimization I am terrible.

2 Likes

Haha, ya I hear ya on the workflow thing. I actually wasn’t aware of the PRAGMA macros either. You learn something new everyday!

Basically DebugGame is Development with PRAGMA_DISABLE_OPTIMIZATION, so no variables are optimized away and you can see it all through. Why use Development during development is beyond my understanding, really, as while I do code I want the maximum transparency on “what’s going on”.

2 Likes