Hello,
In order to give you a better support, could you please give more details about your issue?
Which error are you seeing? If the MCU is not working when not debugging, I recommend you to print messages or toggle a LED to track the issue more easily.
I hope it helps.
Best regards,
Felipe