I faced this problem sometimes. I dont know what is the root cause and how to fix it. I am using Arduino IDE 1.8.2 some is 1.8.12 with hardware programmer which is USBasp. This problem is randomly appear, sometime it does not appear. The problem is "The Selected USB port does not exist“. What I have tried is Reinstall the libusbK USB driver with Zadig program. I load the program to target board with Sketch/Upload with programmer. and selected USBasp(ATTiny Core) from Spence Konde. Any ideas what is the cause of this problem ？
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "E:\Arduino-MyProgram\hardware\ATTinyCore-master\avr/avrdude.conf"
Using Port : usb
Using Programmer : usbasp
Setting bit clk period : 5.0
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
avrdude done. Thank you.
the selected serial port
does not exist or your board is not connected