The debugger engine failed to receive any debug events from the debugging target

Hello guys,
when using Fez Spider sometimes the Debugger fails to get attached, and i just can’t find the cause to this; and it is driving me nuts…

anyone experienced this kind of problem?

i also noticed if i put a break and try to debug while the debugger fails to get attached VS stops the debugger and show the following error: the Break work in the hardware because i can see that the hardware isn’t moving past the break.


The debugger engine failed to receive any debug events from the debugging target

thanks.

usually means that your program is in a tight loop without a thread.sleep()

Thanks Mike,

hmm it is a Gatgeteer application and all i have a simple Led calls in the ProgramStarted()…
i even tried thread.Sleep(1000); at the very beginning and it didn’t help…

notice that sometime it works just fine.

well i did have a foreach loop that just loops through an Object and prints the properties … that could be it… after adding a Thread.Sleep(10); inside the loop it looks like it worked…

so the question is DO I NEED THAT Thread.Sleep(10); if I’m not doing the debug ? or only use it when debugging…

i guess this should be added to the Tips… anytime one uses a for loop should consider adding the Thread.Sleep(); inside the loop for debugging purposes…

thanks.
Jay.

A good system design will never use 100% processor load to allow other threads to work nicely.

If you have a very tight loop that takes a while to finish then it is good to have a delay in it

Well that’s the thing… i don’t really have anything that heavy running:

this is what i have :


uint y = 20;
            foreach (Blinder item in myRoom.Blinders)
            {
                //Thread.Sleep(1);
                Debug.Print("Name: " + item.Name);
                display.SimpleGraphics.DisplayText("Name: " + item.Name + " count=" + myCount, Resources.GetFont(Resources.FontResources.small), GT.Color.White, x, (uint)(y + (1 * 40)));           
                y = y + 10;
            }

myRoom.Blinders have only two objects… so this isn’t that much of a CPU hog …
which makes wonder why it fails…

so basically I’m looking for any thumbs up tips on how to handle similar situations…

and this only happens when debugging the app…
thanks.

Jay

Sorry it has taken me a while to respond. I have been on holiday…

Have you been able to resolve your problem?

Hi Mike,
thanks for checking in… i hope you had great holidays. mine are just coming up ;).

as for the issue no not really,
it just happens randomly…so i can’t really pin point the issue…

and to eliminate the issue i switch to the emulator, because i got tired of having to restart the debugger three to four time before it hooks…

what i found out that works most of the time: is
clean the solution>>Rebuild the solution>>start the debugger… doing these steps seems to make it work…
not sure why… but not all the time though.

Jay.