Once you have enabled the Developer options, check the Stay Awake box to keep your phone from sleeping while you have it plugged in. Of course, pressing the power button will still turn the screen off, just in case you want to get some shut-eye at night.