7
The application could not be launched for debugging. Ensure that the 
target device screen is unlocked and that the application is installed.

How to get rid of this annoying message which appears every time I try to debug or run project from Visual Studio on Windows Phone 7 after 5 minutes of not-using phone (5 minutes is maximum time of sreen time-out I can set in phone settings).

I am missing something? Is it possible to avoid phone form locking/time-outing screen either from VS at start of debugging or in special application that I would manually start first before debugging so that app will be back on screen when debugging is finished and stopping phone from locking screen? But how to stop phone from locking screen? :-)

UPDATE: I have Omnia 7 which is AMOLED and doesn't have "never" setting. According to J. Loomis said in comment below, this is because "they can get severe burn in if left sitting on for extended periods" so best would be to unlock screen programmatically on start of debugging. I think this should work this way in VS.

Pol
  • 5,064
  • 4
  • 32
  • 51

3 Answers3

9

In "Settings" select "lock & wallpaper" turn the password off and set "Screen time-out" to never.

It is important to note that the "never" option will only show if the password switch is set to off.

Jamie Keeling
  • 9,806
  • 17
  • 65
  • 102
Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
  • 1
    The OP said there is no "never" option, I can confirm as on my HD7 I only have 30 seconds, 1 minute, 3 minutes and 5 minutes. – Jamie Keeling Apr 01 '11 at 21:11
  • 3
    In the question Pol metioned the max timeout is 5 mins. This depends on the specific phone model. Some of the devices have AMOLED screens and they can get severe burn in if left sitting on for extended periods. – J. Loomis Apr 01 '11 at 21:11
  • @Jamie Keeling: That's odd, my HD7 has a "never" option. Where are you located? (I'm in the US) – Praetorian Apr 01 '11 at 21:15
  • @Praetorian I'm in the UK with an O2 branded device. – Jamie Keeling Apr 01 '11 at 21:18
  • 2
    Make sure you turn the password Off to be able to see the never option. I only see it if I do that first. – Matt Lacey Apr 01 '11 at 21:22
  • @Matt i am using a samsung focus, even with Password set to Off, i still only see 30 secs, 1 min, 3 mins, and 5 mins. any ideas? OS version: 7.0.7390.0, Firmware revision number: 2130.11.3.3. this is really annoying because my screen time-outs after 5 minutes even when plugged in and then when i have to deploy to my device for testing, i have to turn it on. – jake Jul 26 '11 at 08:27
3

you can set UserIdleDetectionMode = Disabled to prevent the lockscreen from coming down on your app while debugging/developing/testing. Use it with caution in your released app. See MSDN for details:

http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.phoneapplicationservice.useridledetectionmode(VS.92).aspx

btlog
  • 4,760
  • 2
  • 29
  • 38
Stefan Wick MSFT
  • 13,600
  • 1
  • 32
  • 51
  • 1
    Check out this answer for more information on how to use it: http://stackoverflow.com/questions/3920072/can-i-prevent-screen-timeout-on-windows-phone-7/3920329#3920329 – Martin Apr 17 '11 at 22:40
0

My phone (Lumia 800) does not have a setting for "Never" in lock+wallpaper settings, even with the password turned off. The only way I could get the phone to stop locking between debugging sessions is to have another app running in the background behind the app you are debugging that has UserIdleDetectionMode set to disabled. There is an app in the marketplace whose sole purpose is this call Phone! Dont Sleep! (note: I did not make this app nor do I know who made it, I am just sharing because I found it helpful)

bkaid
  • 51,465
  • 22
  • 112
  • 128