Hi,
Any code running in debug mode will be a bit slower than in release mode. There is always an overhead when giving the user the possibility to debug the code.
The best way to avoid this type of problems is not to rely on execution time but to use a timer to control the pace. Use delay functions and keep things executing in sequence.
Please give us some more specifics on your project so we can help you better.
Regards,
Juan Carlos
N.I.