So, I am setting up System.Timers.Timer and have a handler for the Elapsed event. It works as expected.
However, if I want to debug code that is called in a handler with an elapsed time; the timer will continue to generate additional events. Thus, I cannot take one step through the code, because the timer events are stacked on top of each other.
The current workaround is to call Stop on the timer when entering the handler and Start when exiting. However, this does not mean that the system should work in such a way that it is a temporary solution. I was wondering if there is a way to configure the debugger to stop the timer during debugging.
Dunk
source share