Upload and Debug for ATmega328P with Atmel ICE

I’ve seen the post AVR Debuggen met Atmel-ICE en MPLAB X IDE onder Linux which says this error can occur if debugWire has been enabled or is in use.

What does it say when you open a PIO CLI and do

C:\Users\<user>\.platformio\packages\tool-avrdude\avrdude -v  -C "C:\Users\<user>\.platformio\packages\tool-avrdude\avrdude.conf"  -c atmelice_isp  -p m328p

?

Other generic trouble-shooting methods would be: