>>Are you using semihosting in your programs?
yes. But not in this sample and actual post not about problem with semihosting.
Yes, I also have problems with semihosting – in projects with\without mbed. But currently projects with mbed just doesn’t work without connected debugger.
>>the release configuration.
This project just basic project, which created by VisualGDB and doesn’t contains any changes which made by me (only few lines to make leds blinking). I can record step-by-step the process to show you almost everything. Project without mbed is working OK.