Main Site Documentation

This darn debugging stops on first run issue


#1

This issue where the system stops running after you start a debugging session is becoming a pain in the behind. When you hit pause, it’s always stopped at a Thread.Sleep() line (always in the main thread too). If I hit continue, it runs for a little while and does the same again, repeatedly.

Now, something interesting to add to this. I added a watchdog timer to my software last night and because of the pause, the watchdog timed out and reset the board. And here’s the strange part, it was still connected to the debugger when it started as I could hit pause and single step the code but it would no longer pause on me.

Has anyone been able to track down why this pause happens in the first place?


#2

You should set a price out for finding it 8)
Joke aside, If I can find some time I try to reproduce it with a minimum sample.

To everyone out there who has this issue:
Tell me you HW and FW Version, VS Version.
Also the 1st FW Version where you saw it first would be nice.

Here is mine:
G120, stating with 1st VS2012 SDK I think (might be VS2012 related)


#3

G120, G400, VS2012

Noticed it with the last of the 2013 SDK and still same with 2014 R1.

I have a feeling it is related to VS2012.

If you do find it locking up, try adding the watchdog and see if you get the same as I have found?


#4

The vs2012 thing also coincided, iirc, with the latest netmf debug drivers being introduced. Coincidence?


#5

I had some tests running today.
Only different threads and waiting for events between them is no problem. Even when starting 10 or 15 threads and high or low load.
Will try with networking tomorrow.


#6

I’ve no networking but I have 3 threads. Display, ADC and modem. Each of them has a Sleep() but it always stops on the display thread. All threads are created and run from the same module.


#7

@ Dave McLaughlin - In a normal debugging session it’s quite random in which thread you are when you hit pause. I’m not sure if this is a hint or not.
Has your app high memory usage, heavy load, low load or an huge code base?

In my projects where this happens I sometimes have the feeling that it happens only when I have very high CPU load most of the time. But sometimes I get the feeling it happens when it’s idle.
Code base and memory usage on at least one of the projects I’m working on is really high and it has a lot of network traffic.