title: How do I let Android device go to "sleep" while debugging?
body: <p>I was recently debugging a problem relating to the device going into sleep mode and changing activities.  (<a href="https://stackoverflow.com/questions/23475977/android-changes-activity-when-it-goes-to-sleep">Android changes activity when it goes to sleep</a>) Luckily I got the solution without using the debugger, but if I <strong>had</strong> needed the debugger I don't know how to do that.</p>
  
  <p>The device (Samsung Galaxy Player, Android 2.36) has the display timeout set to 30 seconds, and if it's not attached to USB the screen goes black in 30 seconds.   </p>
  
  <p>But if it <strong>is</strong> attached to USB it gets dimmer after 30 seconds but it never goes black and the Activity on the screen still remains active and responsive.   But I need to attach it to USB to debug it.</p>
  
  <p>How, (either programmatically or through some Android setting) can I let my Android device go to sleep normally when it's attached to the debugger so I can use the debugger to investigate Activity life-cycle events associated with sleep/idle states?</p>
  
  <p>My development environment is Eclipse Indigo, Android Development Tools 22.0.1.v201305230001--685707, Windows 7.</p>