I run into this problem quite frequently as well. I’m always using the “Start debugger with GDB” option from inside Visual Studios. I sometimes get that error when I haven’t even set any break points yet. Usually I just hit stop and then “start debugger” again and it works fine, but on occasion I’ve had to flash the entire chip using the ST-Link Utility and then it’ll work.
I was running a year old version of OpenOCD, which I just updated to the latest. I’m hoping that’s the issue but knowing about that “info breakpoints” command might be useful, see if there is somehow a disconnect between what Visual Studios thinks it has for breakpoints vs what GDB thinks it has.
There are indeed a few commands and settings that would indeed result in using extra hardware breakpoints. The “info breakpoints” command together with the gdb session log should fully explain them though.