Debug an avr 4809 with microUPDI?

Sorry to open this again, but something odd has happened and after a break of two months from the project, I am getting this error again:

Sometimes debug faills with a different error and I haven’t captured that one yet.

I reviewed this thread, and I haven’t undone any of the changes made, so my expectation would be that it should work, a bit perplexing…

pio.ini below and the project is just a simple blinkled, also below


[env:ATmega4809]
platform = atmelmegaavr
board = ATmega4809
board_build.variant = 40pin-standard  

framework = arduino
upload_protocol = custom
upload_flags =
    -C
    $PROJECT_PACKAGES_DIR/tool-avrdude-megaavr/avrdude.conf
    -p
    $BOARD_MCU
    -c
    xplainedmini_updi
    -Pusb
    -b115200
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i
debug_tool = custom
; no debug server
debug_server =
debug_port = 127.0.0.1:12555
build_type = debug
debug_load_mode = manual
debug_init_cmds =
  target extended-remote $DEBUG_PORT
  $INIT_BREAK
debug_init_break = tbreak loop

source:

#include <Arduino.h>

int i = 0;

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(100);
  digitalWrite(LED_BUILTIN, LOW);
  delay(100);
  i++;
  if (i>1000)
  {i=0;}
  Serial.println("iteration " + String(i));
}

my process is:
open a cmd prompt and run the python script
from VScode pick ‘start debugging’
debug fails and this output is displayed in the debug console window:

No symbol "target" in current context.
WARNING: Error executing command 'gdb-set target-async on'
PlatformIO Unified Debugger -> http://bit.ly/pio-debug
PlatformIO: debug_tool = custom
PlatformIO: Initializing remote target...
0x00000808 in micros ()
    at C:\Users\Paul\.platformio\packages\framework-arduino-megaavr-megacorex\cores\MegaCoreX/wiring.c:125
125	  return m * 1000 + (t >> 4);
Current language:  auto; currently c++
Breakpoint 1 at 0xbc4: file src/main.cpp, line 9.
PlatformIO: Initialization completed

many thanks for any thoughts on anything to try.
Paul