I usually upload my sketches to my arduinos with the regular USB cable. For no reason, the arduino IDE won't recognize the device connected through the USB port so I resorted to using a USBasp programmer. Apparently it did well the first few times I uploaded my sketch. Now the computer won't detect the USBasp. Its LED indicator won't even turn on! How can I get around this issue?
Try with disconnected ISP.
Does disconnecting cable from USBAsp to board change behavior? That's a good sanity check here.
I finally found out why it didn't turn on. Apparently my external power supply wasn't working properly and supplied a reverse voltage. I fixed it and the USBasp worked. I'm lucky the USBasp didn't get fried. Thanks for the help!
Don't connect an external power supply to your board when reprogramming it using a USBAsp or other ISP programmer unless you have disconnected the Vcc line - failure to do this may damage not only the USBAsp but the computer it's connected to. You generally never want to have the outputs of two power supplies connected, even ones that nominally supply the same voltage - unless you really know for sure how those two supplies will interact, particularly under adverse/extreme conditions (overload, no load, one power supply unpowered, etc).
I would probably achieve this by getting an extra 10-pin ribbon cable, and carefully cutting the Vcc wire, peeling out like half an inch of it, and taping it against the side of the cable) - then I could choose the right cable depending on whether the board was powered. I would be inclined to use brightly colored tape to help you be sure to use the right cable - maybe even matching color of tape at the other end so both ends were marked.
Thank you DrAzzy for giving me that info. Will definitely be more careful with power supplies next time!