In order to help you with your problem you will need to give more information. What programming language are you using? What is the error you get when you run the program? Can you provide the program code at the point the error occurs?
The more information you give the better the answer you receive.
Jdre, Forgive me if I’m misunderstanding, but did you say that running the debug feature, removes the “bugs” causing your problem to go away? That’s what “debugging” is supposed to do. If, however, you’re asking HOW the debugger performs its “magic” well that’s too broad an issue to be addressed in this forum.
Good luck to you and, again, forgive me if I misunderstood .