handmade.network » Forums » Breakpoints in dynamic loaded code (Visual Studio 2017)
mindspyke
9 posts
#16226 Breakpoints in dynamic loaded code (Visual Studio 2017)
1 month, 2 weeks ago Edited by mindspyke on Sept. 4, 2018, 7:11 p.m. Reason: Initial post

Hi, so I'm messing around with the dynamic code loading... and I've got it working nicely... the only small annoyance I have right now is the following:

When I put a breakpoint in a source file that is part of the dynamic loaded code it works, as expected.. Until I do a re-compile of the dynamic code. Then it doesn't work anymore and I have to remove the breakpoint and add it again in visual studio to get it to actually break again...

The new .pdb file for the dynamic code dll gets loaded correctly, but the breakpoints that were in the dynamic code just become useless..
I don't know if this is the best I'm going to get but maybe you guys have a workaround?

Many thanks :D
mrmixer
Simon Anciaux
468 posts
#16229 Breakpoints in dynamic loaded code (Visual Studio 2017)
1 month, 2 weeks ago

Did you try adding a lock file (hmh day39) ?
In hmh, the problem was that the dll file was written and reloaded before the new pdb file was written and so the pdb couldn't be loaded at the same time as the dll by Visual Studio.
mindspyke
9 posts
#16250 Breakpoints in dynamic loaded code (Visual Studio 2017)
1 month, 2 weeks ago

yes the lockfile it doing its thing, I just have to toggle the break point off and on again for it to work....
mrmixer
Simon Anciaux
468 posts
#16252 Breakpoints in dynamic loaded code (Visual Studio 2017)
1 month, 2 weeks ago

Could you provide us the code, or a simplified version that has the problem ?