STM32 Debugging over SWD.
STM32 has a very convenient interface for debugging and flashing the MCU: Serial Wire Debug, SWD for short. Its convenience is that debugging requires connecting only two data pins plus two power pins. The wiring diagram looks like this. Once the pins are connected, you need to enable SWD debugging in the development environment; in KEIL this is done as follows...