How To Uninstall Visual Studio Code In Windows 10

This also happens when the battery is low and when the Macbook is not connected to it's charger. Try connecting the Macbook to a Charger and then connect the lightning cable. This has helped a lot of times for me.