Given the following simplified code
and testing it, for example, through
static void Main(string[] args) { AsyncTest test = new AsyncTest(); test.StartToOpen_Simple(); Console.WriteLine("Started async task. Waiting for exception"); Console.ReadKey(); }
I observe a very annoying problem during its launch in the VS2010 debugger: as in the Summary case, the debugger breaks when throwing in the "tOpen" task, believing that I did not catch the exception (which I make "further below" in the "tComplete" task "). Only if I continue the debugging session can I see that the exception is "bubbling" and therefore handled as desired. If this method runs at a regular interval of time (which it is!) Debugs, this becomes a nightmare because the debugger is divided into each interval.
Running the program on the console does not exhibit this behavior.
- Can someone explain to me why the Debugger breaks in this line, that is, it does not see
- What are my options to intelligently debug code inside VS2010 where such code exists?
source share