STM32F10x microcontroller debugging problem
Your code won't run while the BOOT0 pin is high.
But if your code re-purposes or disables the SWD, or is simply bad in various ways, then you can't reprogram it.
The solution is to:

set BOOT0 high
reset
use the ST/LINK to perform a mass erase
set BOOT0 low
reset
load good code

There are ways to do this with having the ST/LINK manipulate the hardware reset rather than changing the boot pin, but they can be tricky, software configuration needs to be just right, and fake ST/LINK adapters generally aren't able to actually drive their reset output