OPENOCD Debug doesn't work, but on STM32 ST-LINK Software works
To make the debug work you can Erase the chip on the STM32 STLINK Software, it should work.
I had this problem. There was a configuration problem, I looked to the assert functions and it was to pointing to ‘0’ which I believe that resets the microcontroller. Then, I activated the FULL_ASSERT and then I could see what was wrong. In my case it was a GPIO configuration problem. I forgot to put the pulls (I thought that it was not necessary, it’s outputs) on the GPIO_InitTypeDef structure. After I did that, the debug was working.
You can try this solution, but don’t forget to Erase the chip before.