Starting from Android 4.2 Google removed possibility to keep screen on, while device in connected to USB.
This is pretty strange decision, because lot of developers used this function during developing apps.
There is a solution, I found for my case Tasker app
One thing is missing in this solution – you cannot set a build-in task “Keep Screen on”, because as it was said earlier, there is no such in Android 4.2+
Use Display Timeout set to maximum time 23:59:59.