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?
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.
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.
@ 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.