Serial.println() doesn't cut it anymore. Need debugging big guns.

Sam-ice is obsolete at this point. An Atmel-ice, pickit4, or mplab Snap would be preferable.

Of course, none of those work with the Arduino IDE, and I’m not sure whether any of the alternatives can easily import a sketch of the complexity you describe.