VS2012 falls asleep during debug

Hi,

I’m encountering a strange issue while debugging using VS2012.
I want to test a program on my FEZ Cobra 2 for some week to check the RAM usage, so I start the gadgeteer project from Visual Studio without breakpoints and then I go away (I’ll come back once per day to check some information printed in the immediate window).
Often happens that VS2012 falls asleep during the debug and to wake it up I used to add a breakpoint in a random row of code and then immediately remove it.
VS2012 starts to print in the immediate window as fastest as it can all the information that would have to print before (almost as if it’s trying to catch up the delay) and then continue to debug the program as if nothing has happened.

An example, yesterday morning VS2012 has fallen asleep and now I needed to add a breakpoint to wake it up!

I tryied to remove all energy save options and set the power plan to high performance… but nothing has changed…

What do you suggest?
Is a known issue?

@ BigFoot -

When entered low power mode, USB is disable including USB debugger.
If you want to debug in VS, you should switch to serial port debug.

I don’t think this is a known issue.

1 Like

Like Dat said, this is not an issue. USB supply goes you sleep with the system and you won’t be able to debug…because it is asleep :slight_smile:

On a second thought, if you are referring to the debug not working until you stop and rerun your program then this is something others have reported. I have seen it only once myself. I wish there is a easy to easily reproduce this behavior so we can try to solve it.

I’ve seen this happen immediately following the deploy of the project to the microcontroller. I don’t believe USB is going asleep that quickly? Add a debug breakpoint anywhere in the program and everything comes alive and, for me, stays running for days after that.

@ Diesel Engineer -

[quote]Often happens that VS2012 falls asleep during the debug and to wake it up I used to add a breakpoint in a random row of code and then immediately remove it.

An example, yesterday morning VS2012 has fallen asleep and now I needed to add a breakpoint to wake it up![/quote]

Did you get any successful by adding the break point somewhere in code to wake it up?
As I know there are 2 ways: Alarm RTC and GPIO, I don’t understand if you have done it by adding a break point. The serial debug can help VS continue after woke up, but I don’t think it does on USB.