STM32F0 boot0 pin and SWD programming
SWD should work on an unlocked part regardless of the state of the boot0 pin, unless one state triggers the operation of code (or corrupt flash contents misinterpreted as code) which either re-purposes the SWD pins, or puts the chip into a suspend mode with SWD inactive.

Typically if your code does either of these things, it's best to have it not do them until several seconds after reset, so that you can use even a manually triggered reset and immediate SWD connection to get back in.  There are however ways to get the initial part of the SWD connection process to happen while the CPU is held in reset, and thus get in before software can disable the SWD.

A sometimes used shortcut however is to temporarily drive boot0 high which (when the chip is unlocked) causes booting from either the bootloader or the SRAM, with the idea that doing so will prevent the "problem" code in flash from running, and make it easier to get an SWD connection going.