Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Productive Debugging. Because time is money
Nenne (Adora) Nwodo
October 11, 2019
Programming
3
220
Productive Debugging. Because time is money
Nenne (Adora) Nwodo
October 11, 2019
Tweet
Share
More Decks by Nenne (Adora) Nwodo
See All by Nenne (Adora) Nwodo
adoranwodo
0
4
adoranwodo
0
2
adoranwodo
0
290
adoranwodo
0
13
adoranwodo
0
12
adoranwodo
0
41
adoranwodo
0
29
adoranwodo
0
31
adoranwodo
0
22
Other Decks in Programming
See All in Programming
tetsukick
0
180
mehowte
0
180
grapecity_dev
0
170
manfredsteyer
PRO
0
130
grapecity_dev
0
170
neripark
3
640
afilina
PRO
0
140
saten
1
180
hyodol2513
0
590
christianliebel
PRO
0
140
masui_masanori
1
250
watilde
4
1.3k
Featured
See All Featured
zakiwarfel
88
3.4k
mojombo
358
62k
tammielis
237
23k
chrislema
173
14k
ufuk
56
5.4k
chriscoyier
683
180k
marktimemedia
7
390
shpigford
165
19k
bkeepers
408
58k
bryan
31
3.4k
pedronauck
652
110k
bkeepers
52
4.2k
Transcript
Productive Debugging. Because time is money.
2 @THEADORANWODO
3 @THEADORANWODO
HI, I’M ADORA! Software Engineer, Microsoft Dev Blog, YouTube @adorahack
Co-Organizer Android Ngr, GDG Ajah, Unstack @theadoranwodo 4
STORYTIME 5 The first computer bug was actually a moth
@THEADORANWODO
6
What is a debugger ? 7 @THEADORANWODO
Snapshot Debugger 8 Visual Studio Code Visual Studio Xdebug WinDbg
LLDB DBG @THEADORANWODO Debugger Examples PDB
WAYS TO DEBUG 9
LIVE DEBUGGING Step through code, set watches & breakpoints 10
@THEADORANWODO
@THEADORANWODO 11
JUST-IN-TIME DEBUGGING VS debugger launches when an app running outside
of it crashes 12 @THEADORANWODO
13 @THEADORANWODO
CRASH DEBUGGING Blue screen of death 14 @THEADORANWODO
15 @THEADORANWODO
CONSOLE DEBUGGING console.log(“hereeee”) console.log(“here again”) console.log(“here for real this time”)
16 @THEADORANWODO
17 @THEADORANWODO
REMOTE DEBUGGING Remote debug Azure app service, ASP.NET, C# or
C++ 18 @THEADORANWODO DO. NOT. TRY. THIS. IN. PRODUCTION.
19 @THEADORANWODO
TIME TRAVEL DEBUGGING Record program execution and replay later 20
@THEADORANWODO
21 @THEADORANWODO
IMPORTANT THINGS TO KNOW 22 @THEADORANWODO
BREAKPOINTS 23 Interrupt function execution either by explicitly setting it
or when a function occurs @THEADORANWODO
SYMBOLS 24 They are the record of how the compiler
turned source code into machine code @THEADORANWODO
SOURCE LINKING 25 It’s not me, it’s the library I’m
using @THEADORANWODO
PDB FILES 26 The .NET program database @THEADORANWODO
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
THE VS DEBUGGER 28 @THEADORANWODO
DEBUGGING TIPS TO HELP INCREASE PRODUCTIVITY 29 @THEADORANWODO
WATCH WINDOW SEARCH 30 @THEADORANWODO Image from Microsoft Dev Blog
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 @THEADORANWODO Image from Microsoft Dev Blog THE DEBUGGER DISPLAY
ATTRIBUTE
33 @THEADORANWODO Images from Microsoft Dev Blog THE DEBUGGER DISPLAY
ATTRIBUTE
34 @THEADORANWODO Images from Microsoft Dev Blog WRITE EXPRESSIONS IN
THE DEBUGGER DISPLAY
35 @THEADORANWODO Images from Microsoft Dev Blog BREAK WHEN DATA
CHANGES
36 @THEADORANWODO Images from Microsoft Dev Blog HOW DO YOU
LOG DATA WHEN DEBUGGING? Tracepoints are console logs that studied abroad
37 @THEADORANWODO Images from Microsoft Dev Blog HOW DO YOU
LOG DATA WHEN DEBUGGING? Tracepoints are console logs that studied abroad
38 @THEADORANWODO Images from Microsoft Dev Blog EXPLICITLY WRITING TO
THE CONSOLE
39 @THEADORANWODO Images from Microsoft Dev Blog USING TRACEPOINTS
40 @THEADORANWODO Images from Microsoft Dev Blog SET CONDITIONS IN
TRACEPOINTS
41 aka.ms/watchwindowsearch aka.ms/debuggerdisplay aka.ms/managedatabreakpoints @THEADORANWODO
42 @THEADORANWODO
THANK YOU! 43 @THEADORANWODO