Searched a lot on this subject, but all information is about previous-gen Arduino's. I read that the R3 has a (completely?) changed reset circuitry, which ATMel's debugwire relies on.
So my question is: which modifications do I have to make to use debugwire (using the ICSP header) on the Arduino Uno R3? AFAIK just cutting the 'RESET EN' trace is not sufficient.
Second question: Is there a way to do this completely on Linux? I want to use VSCode and PlatformIO, which means setting the DWEN fuse needs to be done with avrdude. So far everyone has used Atmel Studio for this.
If there are other things to keep in mind, please post them. I read somewhere that the bootloader has to be changed as well, which means it might be a good idea to have two Arduino's and use one for debugging purposes only.
I read that the R3 has a (completely?) changed reset circuitry
No. All of the reset changes that I know of for "uno" occurred well before "Uno R3" (back in the Duemilanova days, IIRC.)
"R3" added the I2C connectors.
"Uno" replaced FTDI Serial/USB converter with a USB-capable AVR (8u2, then 16u2)
"Uno WiFi 2" uses a whole new processor, which doesn't even have debugwire.
AFAIK just cutting the 'RESET EN' trace is not sufficient.
That should be all you need. DebugWire uses ONLY the RESET pin for communications.
setting the DWEN fuse needs to be done with avrdude.
That should be possible. Note that CLEARING DWEN has to be done with debugwire (or, I guess, HV Parallel programming), so if you DON'T have a DW-capable "whole system", you'll have bricked your Arduino.
What are you planning on using for DW support on linux? AFAIK, DW is proprietary enough that there aren't any OSSW debugwire tools. I guess you can run MPLABX these days...
Honestly, you'd be better of spending the $20 (includes shipping and probably the otherwise not-included connectors) to get an "Xplained Mini Atmega328p" eval board, which is mostly Arduino-compatible but includes an on-board programmer/debugger.
I read somewhere that the bootloader has to be changed as well