Leonardo USB won't stay connected

I experienced the same issue. But the problem was I used to much power so untill a full led strip was lit, it worked. My solve was to disconnect all hardware and upload an empty script and the board started working.

  • Led strip was 2m Adafruit NeoPixel

Eventually I just outputted 50 percent of power per led and the problem was fixed.