Can you try and reproduce the exact setup from here (How to debug on Arduino mega 2560 - #2 by maxgerhardt)? On my Windows machine, the COM port has to be given in some special way to make (avr-)GDB happy.
Otherwise if it says ENONET
/EPIPE
there, you can try some generic stuff:
- double check that the COM port is correct in the
platformio.ini
- remove the
C:\Users\<user>\.platformio\packages\toolchain-atmelavr
andC:\Users\<user>\.platformio\.cache
folder- (the toolchain executable is in there and might be corrupted?)
- try a new or older extension version
- latest beta with new features: PlatformIO IDE for VSCode 2.3 Beta – Help us with testing!
- older extension version wich is known to sometimes solve problems with debugging:
2.1.0
(example)
- other extensions are known to conflict with PIO debugging (example STM32F407VG Discovery - Debugger not starting when launched with VS Code - #6 by maxgerhardt), it’s advised to try and do this with only PlatformIO and C/C++ (by Microsoft) extension installed