I have calculations I\'m performing which I need to timeout if it runs too long. I might set a timeout of 5 seconds, and do periodic polls throughout my code. Actual code
There is a not so nice workaround.
You have to use Stopwatch instead of calculating the difference between present time and start time.
Let's say you have the following piece of code:
Stopwatch watch = Stopwatch.StartNew();
DoSomething();
DoAnotherThing(); <-- You want to add a breakpoint here
DoFinalThings();
watch.Stop();
You can achieve what you want adding three lines of code before the line you want to breakpoint:
Stopwatch watch = Stopwatch.StartNew();
DoSomething();
watch.Stop();       // Stops measuring time
Debugger.Break();   // Programatically breaks the program at this point
watch.Start();      // Resumes measuring time
DoAnotherThing();
DoFinalThings();
watch.Stop();