How to debug stm32f103C8 Bluepill using stlink v2

Hi,
Im unable to debug my stm32f103c8 bluepill board using the stlink v2 (clone). I can upload using the stlink and that works fine, but when i select debug nothing happens?

my platfomio.ini file:

[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
upload_protocol = stlink
build_type = debug
debug_tool = stlink
debug_init_break = tbreak setup
build_flags = 
    -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
    -D USBCON
    -D USBD_VID=0x0483
    -D USBD_PID=0x5740
    -D USB_MANUFACTURER="Unknown"
    -D USB_PRODUCT="\"BLUEPILL_F103C8\""
    -D HAL_PCD_MODULE_ENABLED

the output of the console after pressing debug:

Processing bluepill_f103c8 (platform: ststm32; board: bluepill_f103c8; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/bluepill_f103c8.html
PLATFORM: ST STM32 (15.4.1) > BluePill F103C8
HARDWARE: STM32F103C8T6 72MHz, 20KB RAM, 64KB Flash
DEBUG: Current (stlink) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES:
 - framework-arduinoststm32 @ 4.20200.220530 (2.2.0)
 - framework-cmsis @ 2.50700.210515 (5.7.0)
 - toolchain-gccarmnoneeabi @ 1.90201.191206 (9.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 11 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
Checking size .pio\build\bluepill_f103c8\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  17.4% (used 3564 bytes from 20480 bytes)
Flash: [====      ]  44.0% (used 28816 bytes from 65536 bytes)

What is the output of the “Debug Console” tab in VSCode?

undefinedError: Unknown environment names 'genericSTM32F103C6'. Valid names are 'bluepill_f103c8'

Are you sure you’ve used the project environment selector correctly to select the bluepill environment? Just re-open VSCode if it still doesn’t work, it should pick the existing env.

thanks, i restarted vscode, now it works.