How to debug on Arduino mega 2560

Failed to launch GDB: Error: write EPIPE

Have a blinky project with debug_init() in setup()
Compiles and uploads fine.

And my platformio.ini

[env:megaatmega2560]
platform = atmelavr
board = megaatmega2560
framework = arduino
upload_port = COM8

debug_tool = avr-stub
debug_port = COM8

lib_deps = 
    jdolinay/avr-debugger @ ~1.1

PIO 2.2.1
VSCode 1.52.1
Win10