{"id":3646,"date":"2012-07-01T20:43:27","date_gmt":"2012-07-01T20:43:27","guid":{"rendered":"https:\/\/test.simple-talk.com\/uncategorized\/you-can-step-over-await\/"},"modified":"2016-07-28T10:50:55","modified_gmt":"2016-07-28T10:50:55","slug":"you-can-step-over-await","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/blogs\/you-can-step-over-await\/","title":{"rendered":"You can step over await"},"content":{"rendered":"<p>I&#8217;ve just found the coolest feature of VS 2012 by far.<\/p>\n<p>I thought that being able to silence an exception from the &#8220;exception was thrown&#8221; popup was awesome, and the &#8220;reload all&#8221; button when a project file changes is amazing, but this is way beyond all of that.<\/p>\n<p><strong>You can step over <code>await<\/code>s when you debug your code!! With F10!!!<\/strong><\/p>\n<p>Ok, so that may not sound such a big deal. You can step over <code>if<\/code>s and <code>while<\/code>s and no-one is celebrating. But <code>await<\/code> is different. <code>await<\/code> actually stops your method, signs up to be notified when a Task is finished,  returns, and resumes your method at some indeterminate point in the future. You could even end up continuing on a completely different thread.<\/p>\n<p>All that happens, and all I have to do is press F10.<\/p>\n<p>I used to have to painstakingly set a breakpoint on the first line of my callback before stepping over any asynchronous method. Even when we started using async, my mouse would instinctively click the margin every time I wanted to go past an await. And the times I was driven insane by my breakpoint getting hit by some other path of execution I don&#8217;t care about.<\/p>\n<p>I think this might have been introduced in the VS11 Beta, I&#8217;m pretty sure I tried it in the Async CTP in VS2010 and it didn&#8217;t work. Now it does! Woop!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve just found the coolest feature of VS 2012 by far. I thought that being able to silence an exception from the &#8220;exception was thrown&#8221; popup was awesome, and the &#8220;reload all&#8221; button when a project file changes is amazing, but this is way beyond all of that. You can step over awaits when you&#8230;&hellip;<\/p>\n","protected":false},"author":5844,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[],"coauthors":[],"class_list":["post-3646","post","type-post","status-publish","format-standard","hentry","category-blogs"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/3646","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/5844"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=3646"}],"version-history":[{"count":3,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/3646\/revisions"}],"predecessor-version":[{"id":42183,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/3646\/revisions\/42183"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=3646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=3646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=3646"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=3646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}