How to debug packaged game?

The game module XXX could not be found. Please ensure that this module exists and that it is compiled.

When you begin to debug game with ‘Debug’ or ‘DebugGame’ or ‘Development’ configration, you will get the error!

1.Put -debug parameter will not solve it;

2.Put -game parameter will not solve it;

3.Put -debug -game parameters will not sovle it;

I just want to debug the game with cooked content, because something rendering do not work in packaged game but work in debug editor.

Please help, I have spent for weeks and I have debug UE4 deep into DirectX interface and still can not figure it out.

You can compile the game in Debug configuration, place the resulting .exe in a packaged game and then launch it from Visual Studio - or even just run the debug exe and then attach the debugger to the running process.

Thanks,it works!

Does it work as well if we make quick changes to the code and rebuild the executable that we can just swap out the executable without having to do an entire cook and packaging again? In other words, we build, cook, and package once. Fix a bug and just rebuild the executable. Will it still work by just swapping it out? Under which cases will it not work (the obvious ones aside)?

For me, that worked, yes.

Another note: I had to copy all *CHECKED_x64.dlls from Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015 to the folder with the same name next to the packaged build in order to properly start the debug executable of the game.