How can I get a debuggable version of my game to load in the editor?

I am still struggling to figure out how to get debugging working with UE4 C++. I have tried running the editor with the -debug flag, but it doesn’t seem to change anything. When I use the editor to compile, the output seems to indicate it is creating a development build, and if I attach the debugger to the editor process and set a breakpoint, most my local variables are optimized out, making it difficult to step through the code and figure out what’s happening. I can set Visual Studio’s build configuration to Debug Game and build the game project, but the editor doesn’t load that version of the game project. Does the -debug switch actually do anything? What do I need to do to get a debuggable version of my game classes to work with the editor?

When you install a version of the Editor via epic games launcher, there are additional options before installing that you can select, including adding debug symbols. I’m not sure if this will fix your problem but it’s an idea

I think I checked those options when I installed, but it’s not engine symbols that are the problem – I just want to debug my own code.

Still haven’t figured this out. What type of build are most people using for C++ projects? The only way I’ve found to debug some things is with very verbose logging, which is cumbersome compared to being able to step through the code.

This was answered on the Unreal Engine Forums: the trick is to launch the editor from Visual Studio. Then you can use whichever build target you want, and the hot reload still works.

You can download the free game mod version to install it. It has fixes for games. Should download in prestigious places like CHPLay, HapMod.com, AppStore, …

You can download the free game mod version to install it. It has fixes for games. Should download in prestigious places like CHPLay, HapMod.com, AppStore, …