Async Debugging Part 3
Vložit
- čas přidán 23. 06. 2024
- Isadora Rodopoulos, an engineer on the Visual Studio Debugging team, wraps up our mini-series on debugging async code. In the first episode ( • Why is Async code hard... ), she provided some insights into how async code works. Last week ( • Async Debugging Part 2 ) she introduced us to async call stacks and what information they contain. Today, she shows how to debug your async code in Visual Studio.
Resources:
Source Code: github.com/isadorasophia/Read...
David Fowler's Async Best Practices: github.com/davidfowl/AspNetCo...
Dissecting Async Methods in C# Blog Post: github.com/davidfowl/AspNetCo...
Debugging Async Code in VS Blog Post: devblogs.microsoft.com/visual...
Debugging Async in VS Video: • Debugging Managed Asyn...
Best Practices w/ Threading in VS: github.com/microsoft/vs-threa...
ConfigureAwait FAQ: devblogs.microsoft.com/dotnet...
Sharplab Compiler Playground for Demo Code: sharplab.io/ - Věda a technologie
Isadora dropping the freaking knowledge bombs, ty so much.
Really enjoyed this async debugging series. Keep up the good work!
This is great, Isadora! Thanks for these tutorials! S2 :)
Nice sleeping kitty in the background! Thanks!
Nice demo but interesting that the cat has decided to not sleep on the confy bed and instead on the small bed on the floor :D
The font size in the visual studio window is too small, the text is almost unreadable
Agreed, I often find this with talks that involve coding, the share screen options in many tools loses so much screen estate and with seeing the speaker(s) as well the actual code is minute
Very nice tutorial! Just one sugestion: Zoom the code a little
Oh, nice, the usual Visual Studio hanging up while trying to figure out "stuff" 😅
That was helpful. Thanks
I have a question, everytime I debug async method, it will hit the break point multiple times. Can anyone explain what's going on here and how to debug in a right way.
Good content but it’s hard to see what’s going on
11:51 oh so the cat is real!
I wasted a lot of time on this ladies and I'm still no closer to the solution. I'm not trying to debug my own code, I'm trying to find out why Microsoft Graph's SDK's GetAsync method isn't returning anything ever. Its not even generating an error so I can't debug what I'm doing wrong and with the extremely limited documentation it appears I'm on my own as the code just skips down past my wait() calls. I don't have a song stuck in my head or any other fun coding task. I have a deadline and a department waiting on my code to hit production in support of a hospital function. Real world shit. I should have known this was for the kids. I'll tell my daughter about this. She should enjoy it.
The concepts of asynchronism are agnostic to the implementation, as responsive design is universal to the example in this video, or to your desired graph display. Such an example is not for a certain demographic, but to demonstrate the concepts with a non-arbitrary application. Wait() is not recommended and I truly hope you are not using that in production release, as it is either blocking the ui thread or blocking a threadpool thread. By awaiting a ValueTask from the method calling GetAsync(), you return to the caller, and you allow other work to be done such as user interaction with the ui.
i.e var myResults = await blah;
😂 It would seem that someone needs to understand how tasks deal with exceptions or something.