Problem with hot reload

I’ve been making a game with C++ and Unreal Engine 4.5.1. I can’t determine what exactly causes it, but there have been multiple occasions where I thought I had a bug in my code, but it turned out that restarting the editor fixed everything and my bug was not actually a bug after all. It’s like the hot reload just stops working for no apparent reason. I can’t work without restarting the editor once in a while. Is this a known problem or is there a certain limitation that I’m not aware of?

There are some issues with the hot reload, if the project build is not detached from the visual studio project at runtime then it will simply NOT hot reload. Compiling in the engine without hot reload will only compile headers and functions that were created before the engine was ran.

If the problem is that you are creating new functions and headers and they’re not being created properly then you need to either restart the engine as you have been or hot reload properly. If you’re not doing so then you when you run the DebugGame_Editor from Visual Studio, click Debug → Detach All and whenever you are ready to hot reload, select Visual studio and hit F7 (or Build) DO NOT run the project, just build it.

Have the output log open on the UE engine so you can get confirmation the build has reloaded. Just make sure that you build when you want to reload, that you don’t have 2 windows of the engine open and that it is detached and everything should work fine.

Thank you for the detailed reply. I will keep this in mind if hot reload stops working again.