title: How do you determine what is executing with async / await?
body: <p>Given that async / await doesn't inherently create a thread and the awaited I/O operation is completed outside of a thread's context, how is one supposed to determine what operations are currently being executed?</p>
  
  <p>To experiment, I put together a small test app which would fire off 1 long-running IO operation and awaited it. I ran the test program and during the the long running IO operation, created a dump file and inspected the threads using <code>WinDbg</code>. Nowhere within the thread stacks was it clear (to me at least) of that awaited call. I didn't see any of my .Net code, I didn't see any class references of the library I was calling (Amazon in this case).</p>
  
  <p>I tried the same thing, but fired off 3 long-running IO operations all at the same time and awaited them. I created another dump file. My threads and stack traces look nearly identical.</p>
  
  <p>How are situations like this debugged? How would I determine what is "running" right now when my app basically appears to look like its idle in terms of its thread's call stacks? The closest solution I've come up with is to inspect the heap and look for objects I know would be allocated during that awaited operations and see how many exist. (i.e. 3 <code>WebRequest</code> objects, etc.)</p>
  
  <p>Surly there is a better method to this! </p>