Samsung Galaxy S4 won't connect to computer with USB solutions and fixes
Does your S4 not connect to the computer any more via USB. This video should help you.
Make sure you are using the Galaxy S4 cable that came with the phone (test with another cable if you haven't yet)
Remove your battery and sim card and restart your phone may also work.
Update your drivers. Can be found here.
If this doesn't work try downloading Kies 3 from Samsungs website.
If that doesn't work try debugging mode. Go to settings - More options - About device - Click device number 7 times.
Then go back to developer options and make sure it is turned on in the top right hand corner and then scroll down to USB debugging turn it on and restart your phone.
If you are using a launcher, you need to switch back to the standard TouchWiz homescreen and then connect your phone.
The other option is to us the usb menu from the dialer pad and if it isn't on MTP + ADB then change it and reboot your phone and reconnect the device.
Dial pad for usb menu numbers:
Dial ##3424# then select CDMA modem, then qualcomm USB settings from there select MTP and hit ok for S4 Mini users
GALAXY ALPHA worked after reboot with the *#0808# - USB (AP) - USB Settings (MTP + ADB) - OK - Reboot
I recommend Airdroid for wirelessly transferring your files.
How to make your Samsung Galaxy S4 Faster and More Responsive
Samsung Galaxy S4 List of Secret Codes and Uses