I got it working - a bad cable ! This is now the output from the debug window:
and the pthon script loops with lots of this:
C:\Users\Paul\Downloads\pyAVRdbg-master\pyAVRdbg-master>python main.py
INFO:pyedbglib.hidtransport.hidtransportbase:Manufacturer: ATMEL
INFO:pyedbglib.hidtransport.hidtransportbase:Product: mEDBG CMSIS-DAP
INFO:pyedbglib.hidtransport.hidtransportbase:Serial Number: MICROUPDIPROGRAMMERX
INFO:pymcuprog.deviceinfo.deviceinfo:Looking for device atmega4809
INFO:pymcuprog.nvm:UPDI baud rate: 900000bps
INFO:root:Event recived
PC: 527
INFO:root:Recived break event
INFO:root:No event
Waiting for GDB session 127.0.0.1:12555
Connected by ('127.0.0.1', 63512)
-> $qSupported#37
<- +
INFO:root:AVR running state False
Supported
<- $PacketSize=1000#f1
INFO:root:No event
-> ++$?#3f
<- +
INFO:root:AVR running state False
<- $S00#b3
INFO:root:No event
-> +$Hc-1#09
<- +
INFO:root:AVR running state False
<- $#00
INFO:root:No event
-> +$qC#b4
<- +
INFO:root:AVR running state False
C
<- $#00
INFO:root:No event
-> +$qOffsets#4b
<- +
INFO:root:AVR running state False
Offsets
<- $Text=000;Data=000;Bss=000#24
INFO:root:No event
-> +$Hg0#df
<- +
INFO:root:AVR running state False
<- $#00
INFO:root:No event
-> +$g#67
<- +
INFO:root:AVR running state False
['0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x6a', '0x4e', '0xce', '0x3f', '0x20', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x60', '0x38', '0x4e', '0xcd', '0x3f', '0x20', '0x0']
['0x21']
['0xcd', '0x3f']
<- $00000000000000000000000000006a4ece3f2000000000000060384ecd3f200021cd3f#c2
INFO:root:No event
-> +$p22#d4
<- +
INFO:root:AVR running state False
527
0x20f
0x41e
0000041e
1e040000
<- $1e040000#ba
INFO:root:No event
-> +
INFO:root:No event
-> $m803fce,8#9a
<- +
INFO:root:AVR running state False
803fce
8
80
INFO:root:Reading from address 0x003FCE
bytearray(b's>\xacsY\xfa\xfb\xe5')
733eac7359fafbe5
<- $733eac7359fafbe5#c7
INFO:root:No event
-> +$m803fd6,8#6c
<- +
INFO:root:AVR running state False
803fd6
8
80
INFO:root:Reading from address 0x003FD6
bytearray(b'\xfc\xff\xbf\xcd?\xec\xde?')
fcffbfcd3fecde3f
<- $fcffbfcd3fecde3f#e7
INFO:root:No event
-> +$m803fde,8#9b
<- +
INFO:root:AVR running state False
803fde
8
80
INFO:root:Reading from address 0x003FDE
bytearray(b'\n\xdaT+\x9d\xed\xfd\x8f')
0ada542b9dedfd8f
<- $0ada542b9dedfd8f#21
INFO:root:No event
-> +$m803fe6,8#6d
<- +
INFO:root:AVR running state False
803fe6
8
80
INFO:root:Reading from address 0x003FE6
bytearray(b'\xf3OC\xfb\xe3\xf3\xb8U')
f34f43fbe3f3b855
<- $f34f43fbe3f3b855#97
INFO:root:No event
-> +$m803fee,8#9c
<- +
INFO:root:AVR running state False
803fee
8
80
INFO:root:Reading from address 0x003FEE
bytearray(b'\xfe\x17~R3\xff\xd6\xf7')
fe177e5233ffd6f7
<- $fe177e5233ffd6f7#9f
INFO:root:No event
-> +$m803ff6,8#6e
<- +
INFO:root:AVR running state False
803ff6
8
80
INFO:root:Reading from address 0x003FF6
bytearray(b'\x9b\xdf\xe5\xe4\xebl?\xff')
9bdfe5e4eb6c3fff
<- $9bdfe5e4eb6c3fff#5d
INFO:root:No event
-> +$m803ffe,8#9d
<- +
INFO:root:AVR running state False
803ffe
8
80
INFO:root:Reading from address 0x003FFE
bytearray(b'\x00k\x0c\x94P\x00\x0c\x94')
006b0c9450000c94
<- $006b0c9450000c94#bd
INFO:root:No event
-> +$!#21
<- +
INFO:root:AVR running state False
<- $#00
INFO:root:No event
-> +$qSymbol::#5b
<- +
INFO:root:AVR running state False
Symbol::
<- $OK#9a
INFO:root:No event
-> +$m5de,40#fb
<- +
INFO:root:AVR running state False
5de
40
0
INFO:root:Reading from address 0x0005DE
bytearray(b'!\xf4\xe5\x01"\x96\xf5\x01\x11\x81\x00\xe0\xdc\xcf\xea\xe0\xee\x16\xf1\x04\t\xf4\xbb\xc0\xf0\xe1\xef\x16\xf1\x04\t\xf0m\xc0\xe7\xcfx\xe0\xe7.\xf1,\x81,\x91,\xa1,`\xe1\xb6.p\xc0?\xe91\x0f:1(\xf49\xea')
21f4e5012296f501118100e0dccfeae0ee16f10409f4bbc0f0e1ef16f10409f06dc0e7cf78e0e72ef12c812c912ca12c60e1b62e70c03fe9310f3a3128f439ea
<- $21f4e5012296f501118100e0dccfeae0ee16f10409f4bbc0f0e1ef16f10409f06dc0e7cf78e0e72ef12c812c912ca12c60e1b62e70c03fe9310f3a3128f439ea#ed
INFO:root:No event
-> +
INFO:root:No event
-> $qfThreadInfo#bb
<- +
INFO:root:AVR running state False
fThreadInfo
<- $#00
INFO:root:No event
-> +$qL1200000000000000000#50
<- +
INFO:root:AVR running state False
L1200000000000000000
<- $#00
INFO:root:No event
-> +$qC#b4
<- +
INFO:root:AVR running state False
C
<- $#00
INFO:root:No event
-> +
INFO:root:No event
INFO:root:No event
-> $Z0,5de,2#12
<- +
INFO:root:AVR running state False
0
5de
1502
<- $OK#9a
INFO:root:No event
-> +$Z0,5ec,2#11
<- +
INFO:root:AVR running state False
0
5ec
1516
<- $OK#9a
INFO:root:No event
-> +$vCont?#49
<- +
INFO:root:AVR running state False
<- $#00
INFO:root:No event
-> +$Hc0#db
<- +
INFO:root:AVR running state False
<- $#00
INFO:root:No event
-> +$c#63
<- +
INFO:root:AVR running state False
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
INFO:root:No event
`
and finishes with this when I terminate the debug session in VSCode:
INFO:root:No event
INFO:root:No event
Traceback (most recent call last):
File "C:\Users\Paul\Downloads\pyAVRdbg-master\pyAVRdbg-master\main.py", line 329, in <module>
data = conn.recv(1024)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
C:\Users\Paul\Downloads\pyAVRdbg-master\pyAVRdbg-master>