Debug controls inactive then they disappear

I am trying to run debug on a basic relay example. Following this example Debugging with PlatformIO: Part 1. Back to the Basics | PlatformIO Labs

I have tried to run it 2 ways. First from top menu. Run>Debug. The controls appear but the step into, step over, step out buttons are grayed out. The entire debug control disappears after a while. The restart and stop icons are active and if I click Restart then I get an error message box

[Content]

Failed to launch GDB: .pioinit:13: Error in sourced command file:
:3333: The system tried to join a drive to a directory on a joined drive. (from interpreter-exec console “source .pioinit”)

I can see the debugger window and I can see the break points and
but the code never stops at the break point. I can hear the program running on the Arduino Uno

If I again select Run>Debug I get a VSCode error message

Failed to launch GDB: .pioinit:13: Error in sourced command file:
Bogus trace status reply from target: timeout (from interpreter-exec console “source .pioinit”)

I have also tried to run it from the quick access control on the left window. No real difference
Here is platformio.ini

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html


[env:uno]
platform = atmelavr
board = uno
framework = arduino
debug_tool = avr-stub
debug_port = \\.\COM9
lib_deps =jdolinay/avr-debugger @ ~1.1

Here is launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "platformio-debug",
            "request": "launch",
            "name": "PIO Debug",
            "executable": "c:/Users/Colin/Documents/PlatformIO/Projects/Relay Example/.pio/build/uno/firmware.elf",
            "projectEnvName": "uno",
            "toolchainBinDir": "C:/Users/Colin/.platformio/packages/toolchain-atmelavr/bin",
            "internalConsoleOptions": "openOnSessionStart",
            "preLaunchTask": {
                "type": "PlatformIO",
                "task": "Pre-Debug"
            }
        },
        {
            "type": "platformio-debug",
            "request": "launch",
            "name": "PIO Debug (skip Pre-Debug)",
            "executable": "c:/Users/Colin/Documents/PlatformIO/Projects/Relay Example/.pio/build/uno/firmware.elf",
            "projectEnvName": "uno",
            "toolchainBinDir": "C:/Users/Colin/.platformio/packages/toolchain-atmelavr/bin",
            "internalConsoleOptions": "openOnSessionStart"
        },
        {
            "type": "platformio-debug",
            "request": "launch",
            "name": "PIO Debug (without uploading)",
            "executable": "c:/Users/Colin/Documents/PlatformIO/Projects/Relay Example/.pio/build/uno/firmware.elf",
            "projectEnvName": "uno",
            "toolchainBinDir": "C:/Users/Colin/.platformio/packages/toolchain-atmelavr/bin",
            "internalConsoleOptions": "openOnSessionStart",
            "loadMode": "manual"
        }
    ]
}

What cpp code are you using? The one from https://docs.platformio.org/en/latest/plus/debug-tools/avr-stub.html#debugging-tool-avr-stub?

#include <Arduino.h>
#define relayPin1 3
#define relayPin2 4
void setup()
{
pinMode(relayPin1, OUTPUT);
pinMode(relayPin2, OUTPUT);
}
// the loop function runs over and over again forever
void loop()
{
digitalWrite(relayPin1, HIGH);
digitalWrite(relayPin2, LOW);
delay(3000);
digitalWrite(relayPin1, LOW);
digitalWrite(relayPin2, HIGH);
delay(3000);
}

As the documentation above for avr-stub states, you need to at least #include "avr8-stub.h" and place debug_init(); in setup(). Also best to place a call to breakpoint(); first thing in loop().

Thank you for the pointer. I did not detect this documentation before you pointed me there. From there I managed to find my way.

Thanks again,
Colin