Async Debugging Part 3

Sdílet
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

Komentáře • 16

  • @daltonbrady2492
    @daltonbrady2492 Před 3 lety +4

    Isadora dropping the freaking knowledge bombs, ty so much.

  • @horatiu2003
    @horatiu2003 Před 3 lety +2

    Really enjoyed this async debugging series. Keep up the good work!

  • @rubenseam
    @rubenseam Před 3 lety +2

    This is great, Isadora! Thanks for these tutorials! S2 :)

  • @macmcmillen7425
    @macmcmillen7425 Před 2 lety

    Nice sleeping kitty in the background! Thanks!

  • @varunsharma1889
    @varunsharma1889 Před 3 lety +3

    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

  • @itpro9378
    @itpro9378 Před 2 lety +3

    The font size in the visual studio window is too small, the text is almost unreadable

    • @GBPhilip
      @GBPhilip Před 2 lety

      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

  • @rafaspimenta
    @rafaspimenta Před 2 lety +1

    Very nice tutorial! Just one sugestion: Zoom the code a little

  • @MarcioHuser
    @MarcioHuser Před 2 lety +1

    Oh, nice, the usual Visual Studio hanging up while trying to figure out "stuff" 😅

  • @vivekacharya3110
    @vivekacharya3110 Před 3 lety

    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.

  • @watchchat
    @watchchat Před 2 lety +1

    Good content but it’s hard to see what’s going on

  • @bigstones84
    @bigstones84 Před 2 lety

    11:51 oh so the cat is real!

  • @TheFunkBros
    @TheFunkBros Před 2 lety +2

    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.

    • @JimboJumboBumbum
      @JimboJumboBumbum Před rokem

      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;

    • @TheAceInfinity
      @TheAceInfinity Před rokem

      😂 It would seem that someone needs to understand how tasks deal with exceptions or something.