Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Productive Debugging. Because time is money

Productive Debugging. Because time is money

Fbe54abf4094d19f1548783d072a7fa7?s=128

Nenne (Adora) Nwodo

October 11, 2019
Tweet

Transcript

  1. Productive Debugging.
 Because time is money.

  2. 2 @THEADORANWODO

  3. 3 @THEADORANWODO

  4. HI, I’M ADORA! Software Engineer, Microsoft Dev Blog, YouTube @adorahack

    Co-Organizer Android Ngr, GDG Ajah, Unstack @theadoranwodo 4
  5. STORYTIME 5 The first computer bug was actually a moth

    @THEADORANWODO
  6. 6

  7. What is a debugger ? 7 @THEADORANWODO

  8. Snapshot Debugger 8 Visual Studio Code Visual Studio Xdebug WinDbg

    LLDB DBG @THEADORANWODO Debugger Examples PDB
  9. WAYS TO DEBUG 9

  10. LIVE DEBUGGING Step through code, set watches & breakpoints 10

    @THEADORANWODO
  11. @THEADORANWODO 11

  12. JUST-IN-TIME DEBUGGING VS debugger launches when an app running outside

    of it crashes 12 @THEADORANWODO
  13. 13 @THEADORANWODO

  14. CRASH DEBUGGING Blue screen of death 14 @THEADORANWODO

  15. 15 @THEADORANWODO

  16. CONSOLE DEBUGGING console.log(“hereeee”) console.log(“here again”) console.log(“here for real this time”)

    16 @THEADORANWODO
  17. 17 @THEADORANWODO

  18. REMOTE DEBUGGING Remote debug Azure app service, ASP.NET, C# or

    C++ 18 @THEADORANWODO DO. NOT. TRY. THIS. IN. PRODUCTION.
  19. 19 @THEADORANWODO

  20. TIME TRAVEL DEBUGGING Record program execution and replay later 20

    @THEADORANWODO
  21. 21 @THEADORANWODO

  22. IMPORTANT THINGS TO KNOW 22 @THEADORANWODO

  23. BREAKPOINTS 23 Interrupt function execution either by explicitly setting it

    or when a function occurs @THEADORANWODO
  24. SYMBOLS 24 They are the record of how the compiler

    turned source code into machine code @THEADORANWODO
  25. SOURCE LINKING 25 It’s not me, it’s the library I’m

    using @THEADORANWODO
  26. PDB FILES 26 The .NET program database @THEADORANWODO

  27. MANAGING STATE 27 Inspect state & manipulate it. Variable windows:

    Autos, locals, watches Execution state: Call stack, thread & modules Registers, Disassembly, memory Interactive Windows Object IDs @THEADORANWODO
  28. THE VS DEBUGGER 28 @THEADORANWODO

  29. DEBUGGING TIPS TO HELP INCREASE PRODUCTIVITY 29 @THEADORANWODO

  30. WATCH WINDOW SEARCH 30 @THEADORANWODO Image from Microsoft Dev Blog

  31. 31 @THEADORANWODO Image from Microsoft Dev Blog THE DEBUGGER DISPLAY

    ATTRIBUTE new Book(){ id = 1, title = “Things fall apart”, author = “Chinua Achebe”, createdAt = “2019-10-10 00:00:00”, updatedAt = “2019-10-10 00:00:00” } This Book Object is cute but I want just “Chinua Achebe”
  32. 32 @THEADORANWODO Image from Microsoft Dev Blog THE DEBUGGER DISPLAY

    ATTRIBUTE
  33. 33 @THEADORANWODO Images from Microsoft Dev Blog THE DEBUGGER DISPLAY

    ATTRIBUTE
  34. 34 @THEADORANWODO Images from Microsoft Dev Blog WRITE EXPRESSIONS IN

    THE DEBUGGER DISPLAY
  35. 35 @THEADORANWODO Images from Microsoft Dev Blog BREAK WHEN DATA

    CHANGES
  36. 36 @THEADORANWODO Images from Microsoft Dev Blog HOW DO YOU

    LOG DATA WHEN DEBUGGING? Tracepoints are console logs that studied abroad
  37. 37 @THEADORANWODO Images from Microsoft Dev Blog HOW DO YOU

    LOG DATA WHEN DEBUGGING? Tracepoints are console logs that studied abroad
  38. 38 @THEADORANWODO Images from Microsoft Dev Blog EXPLICITLY WRITING TO

    THE CONSOLE
  39. 39 @THEADORANWODO Images from Microsoft Dev Blog USING TRACEPOINTS

  40. 40 @THEADORANWODO Images from Microsoft Dev Blog SET CONDITIONS IN

    TRACEPOINTS
  41. 41 aka.ms/watchwindowsearch aka.ms/debuggerdisplay aka.ms/managedatabreakpoints @THEADORANWODO

  42. 42 @THEADORANWODO

  43. THANK YOU! 43 @THEADORANWODO