How to make screen stay turned on while charging? I have 2 devices: one with Android 4.2.1 (Emotion UI 1.6), one with Android 5.1.

Android 4 device has an option in "developers" settings to always keep screen turned on while charging. Android 5 device seems not have "developers" settings at all, and I couldn't find such an option to keep screen turned on while charging anywhere.

Could I somehow tell my Android 5.1 device not to turn off the screen after timeout, when charger is plugged?
This option is still there in developer settings. Those settings have just been hidden since around Android 4.2/4.3. Our developer-options tag-wiki shows you how to enable them:


Go to Settings → About
tap the Build number entry 7 times (hammering the item)
Go back to the Settings main page, Developer Settings should now be visible


In there you'll now find the option to "keep display on".