This seems to be very common issue. I have Windows 10 and Samsung Galaxy S4 mini. For some time it worked fine. But the the issues started. Usually USB device was not recognized or then malfunctioned (by error message). Sometimes phone was periodically found and lost in every few seconds.
Tried different usb cables, reinstalled Samsung Kies, reinstalled usb driver, no changes.
For me the help came form https://www.youtube.com/watch?v=9qAFgn-tZUU
My phone was already in development mode. Android 5.0.1
From all the options what helped me was
Use the usb menu from the dialer pad, set it to CP, change it and reboot your phone and reconnect the device.
Dial pad for usb menu numbers:
Maybe settings back to MTP + ADB would work too, but as i was in a hurry do download some files form phone this test will have to wait another day.