Debugging Tips and Tricks Part 1

Sdílet
Vložit
  • čas přidán 18. 06. 2024
  • In this episode (part 1 of 2), Robert is joined by Leslie Richardson, who shows several ways you can get the most out of Visual Studio's debugging tools. She shows a number of features, most of which have been in the product all along. Whether you are a new or experienced developer, you will see some things you can use to help solve issues in your code.
    Check out aka.ms/debuggerdisplay to learn more about customizing object displays in the debugger
  • Věda a technologie

Komentáře • 39

  • @lixin5169
    @lixin5169 Před 4 lety +12

    1 "Run To" button just at the head of the lines
    2 Pin the "Watch" window (it can't be in another monitor, BTW)
    3 DebuggerDisplay to show customized information in the Watch/Auto/Local window
    4 Text Visualizer(XML, HTML, JSON)
    5 Actions in Breakpoint setting, log a message to the Output window, also in the "Diagnostic Tools -> Events" window

  • @MasonWiseman
    @MasonWiseman Před 4 lety +15

    Been using VS forever and didn't know about quite a few of these. Very informative and helpful!

  • @KillerMZE
    @KillerMZE Před 4 lety

    This was really good. Only knew 3 of these tips, and the tracing breakpoints are going to be so helpful. One note about conditional breakpoints, they slow down execution a lot, even compared to debug speed, so use them sparingly.

  • @salihkarabilo7005
    @salihkarabilo7005 Před 4 lety

    Thanks for the content, Love the RunToClick and DebuggerDisplay. Keep the great conent up!

  • @onewhispergaming6435
    @onewhispergaming6435 Před 4 lety

    Thanks for the debugging tips. I do C# in Visual Studio. I love the interface of Visual Studio 2019.

  • @iancarr3923
    @iancarr3923 Před 4 lety

    Great video. Love the debuggerdisplay feature. As an olidie I remember conditional break points in VS2005. Nothing to do with programming but good to see "Pere Goriot" in the book list.

  • @mohdotnet
    @mohdotnet Před 4 lety

    Very informative many thanks for sharing. Did not know this existed.

  • @DalTron001
    @DalTron001 Před 4 lety +2

    This is awesome! I need like a simplified cheat sheet with tips like this on it.

  • @Matll
    @Matll Před 4 lety

    Thanks, these were actually really handy tips!

  • @lestersantiago510
    @lestersantiago510 Před 4 lety

    Awesome share. and awesome to see firefox being used on the demo :) Immediate windows is nice!

  • @bigshadow86
    @bigshadow86 Před 4 lety

    I have been using Visual Studio since day one. I didn't know about the debuggerdisplay attribute on the class object. To display the objects of a list or arrray in a data tip, I have always override the ToString() function and write all the logic in there. I have never seen the run to click feature, seems handy.

  • @julianocs87
    @julianocs87 Před 4 lety

    Very helpful. Keep up with the good content.

  • @Kefitzat_haDerech
    @Kefitzat_haDerech Před 4 lety +1

    Great!! Also please do one on profiling tools.

  • @Corrado49
    @Corrado49 Před 4 lety

    very helpful and well explained

  • @embeddedsemrade
    @embeddedsemrade Před 3 lety

    I really like this video thank you!

  • @johannesschweer6301
    @johannesschweer6301 Před 4 lety

    This is an awesome video! Is it possible to get these type of Tips and Tricks for Visual Studio Code?

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

    Very helpful video :)
    Just one thing: many videos on Channel 9 and other Microsoft's channels are described with timeline.
    something like:
    2:45 : Run Execution to line
    3:30 : Pin Watching item.....
    It's a lot easier for me to review video like that, instead of viewing full video with many things i have already known.

    • @_fbr
      @_fbr Před 4 lety

      I couldn't agree more. Also, it would be great if you can add bookmarks in the video so people can jump to the main points just like in other sites like Ud*my. JustMy2Cents.

  • @jessesinger923
    @jessesinger923 Před 4 lety

    This is great.

  • @b_gumm
    @b_gumm Před rokem

    Thank you

  • @rehmanshahid5671
    @rehmanshahid5671 Před 4 lety

    One of my favourite is watch window...

  • @LuigiZambetti
    @LuigiZambetti Před 2 lety

    Please, add more videos about Visual Studio debugging.

  • @eclectictraveler9073
    @eclectictraveler9073 Před 4 lety

    Is there a git repo to tinker with it?

  • @madisonmadison3825
    @madisonmadison3825 Před 4 lety

    With regard to Tip 3 "DebuggerDisplay attribute": we could override ToString() to get same result in previous VS

    • @lugoheriberto
      @lugoheriberto Před 2 lety

      In any vs you can do that. But tostring is generally for use in code.

  • @孫守真
    @孫守真 Před 4 lety

    11:30 breakpoint Actions 14:00 Output Windows
    Why did my Visual Studio 2019 Community print it in the Immediate Window, not in Output? Thanks.
    感恩感恩 南無阿彌陀佛

  • @hamadanjum4720
    @hamadanjum4720 Před 4 lety

    Thats cool.

  • @RonaldZaZ
    @RonaldZaZ Před 4 lety

    You don't need to restart the application if you add/change a conditional breakpoint. Maybe your app needs to be restarted to reach the code you are debugging, but then that's simply because how your app is written.

    • @lugoheriberto
      @lugoheriberto Před 2 lety

      She didn't restart because of the breakpoint. She restarted because of state the app was in. In this example she could've just dragged the current step to the beginning. Which she know because she shows it in another video.

  • @Chiramisudo
    @Chiramisudo Před 3 lety +1

    Go upvote "Support data breakpoints for .NET framework" here!:
    developercommunity.visualstudio.com/idea/518713/support-data-breakpoints-for-net-framework.html

  • @GaddiShare
    @GaddiShare Před 4 lety

    Please increase font size of code in next parts of this series.

  • @anamamer2600
    @anamamer2600 Před 6 měsíci

    I feel like a neanderthal after watching this. God i could have saved 100s of hours if i knew this

  • @tenminutetokyo2643
    @tenminutetokyo2643 Před 4 lety

    “What does it say about the quality of your engineering if you have to have all this testing” - Steve Jobs

    • @aaronandannelogan
      @aaronandannelogan Před 4 lety +2

      With all due respect to Jobs, that seems like a very cavalier attitude to have with respect to software testing.

  • @bradleyr4451
    @bradleyr4451 Před rokem

    Why the black screen? with faint dark green or faint dark blue text? with no contrast? To read the screen have to use magnifier at 200x. Are we fancy and important if we use the black screen? Oh Im so sophisticated because I saw that one guy use the dark background so I want to look smart? You cannot prefer this over the normal background??
    I came from the monochrome crt world. Those screens had contrast, this does not, its not readable.

  • @medusaskull9625
    @medusaskull9625 Před rokem

    My code is perfect. My bug is also perfect. It's not easy to debug.

  • @MobilTemp
    @MobilTemp Před 4 lety +1

    Sound angry..