Oh right, yeah that won’t work. PlatformIO does not support debugging via an Atmel-ICE out of the box that way. The supported upload and debug options are listed in the documentation of the board.
It not being supported out of the box mainly stems from Atmel refusing to release tools that open a standard GDB server and something that does not depend on AtmelStudio.
You can use the Atmel-ICE for upload since AVRDude supports it, but for that you need to set upload_protocol
to the programmer id value that AVRDude expects. That should be atmelice_isp
. See How to setup Atmel-ICE to program an ATmega328 on PlatformIO with VSCode on Windows 10 for full config.
You can also use experimental Atmel-ICE debugging through the avarice
tool. See CLion / Avarice debug not working for config and AVaRICE download | SourceForge.net for a binary download.