A while ago I posted about having issues with setting breakpoints in remedybg and I stumbled upon the solution while watching a handmade hero stream yesterday. I realized that Casey Muratori almost always sets breakpoints while the game is running, whereas I set the breakpoints before I start the debugging.
I do not know if what I describe below is a bug or intended or if I just plain don't know how to use debuggers. Please tell me which it is.
So here are the steps to reproduce this:
- Compile handmade hero such that there is a win32 executable and a dll that it loads which has the game code.
- Open remedy and set a breakpoint in a file (like handmade.cpp) which ends up in the dll.
- Start debugging by pressing F5.
- The breakpoint will not be respected by remedy
- Compile same as before
- Start debugging by pressing F5
- Open handmade.cpp and set a breakpoint while the program is running.
- The breakpoint is now respected
In visual studio both sequence of steps described above lead to the execution being stopped at the breakpoint.
I have also made a video recording of all three of the above sequence of steps if you would like to see me demonstrate the thing I'm talking about: