VSC Debug with stlink fails but upload is successful

Then it has to be something specific to what is doing Marlin or the version of platform-ststm32 it’s using.

I’m noticing the blinky log above has the reset method

Aka pulsing NRST which is connnected to the system reset (SRST) connection (“hardware reset”). On the other hand, Marlin is using

which is a software reset via the SWD protocol.

Find this file in your local Marlin download

and change the last entry to

"reset_config srst_only separate srst_nogate srst_open_drain connect_deassert_srst"

then retry debugging.

Don’t forget to use the project environment switcher in the bottom taskbar to switch back to the correct Marlin environment.