MKR1000 board changing ports during IDE upload

I'm running Windows 7 with Arduino IDE 1.8.1 and the MKR1000 board rev 02. I've seen many similar posts on this and other forums but I have not found a solution that works for me. I've also gone through the troubleshooting guide, tried different USB cables, tried fixing the COM port in Device Manager, etc.

When I upload a sketch, the board seems to jump COM ports. During the upload, I also see an error message (SAM-BA operation failed). If I open the Serial Monitor after the upload, I do see that my code was successfully uploaded. While this helps somewhat, it prevents me from debugging the board (i.e., setting up wifi in setup()).

Any help would be greatly appreciated.

Below is the simple sketch I'm using:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);  
  
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  delay(5000);
  Serial.println("hi"); 
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
}

Its normal for the MKR to change ports in the upload phase as it does have two !

Going to ask this be moved to the MKR section where you will find more information.

This looks relevant:

Thanks Pert.

That also covers the USB 3.0 issues I often harp on about.
But since discovered the cheap way to have the best of both worlds is just to throw a USB 2.0 powered hub between them.

Methinks Arduino should have grabbed the USB 3.0 issue by now and be looking at it to save a lot of problems in the forums.