-
Notifications
You must be signed in to change notification settings - Fork 0
/
overview.qmd
113 lines (63 loc) · 2.43 KB
/
overview.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
title: "Debugging Overview"
author: "Shannon Pileggi"
footer: "[Debugging](https://github.com/shannonpileggi/iterating-well-with-purrr)"
logo: "img/wtf-logo-square-transparent.png"
format:
revealjs:
theme: [night, slides.scss]
highlight-style: a11y
transition: fade
slide-number: true
chalkboard: true
editor: visual
execute:
freeze: auto
---
## Key concepts
<br>
`r fontawesome::fa("road", fill = "white")` traceback
`location` where did the error occur
<br>
`r fontawesome::fa("bug", fill = "white")` interactive debugger
`context` why did the error occur
<br>
`r fontawesome::fa("magnifying-glass", fill = "white")` your code vs `r fontawesome::fa("hat-wizard", fill = "white")` their code
::: notes
interactive debugging: pause the execution of a function and launch environment where you can interactively explore what's happening
:::
## Debugging tools
![](img/debugging_tools.svg)
## Debugging your code
![](img/debugging_yours.svg)
## Debugging in the RStudio IDE
![](img/debugging_ide.svg)
## Debugging their code
![](img/debugging_theirs.svg)
## Debugging special cases
![](img/debugging_special.svg)
## Pick your favorite
![](img/debugging_pick.svg)
## Go forth, <br> and learn from your bugs!
::: columns
::: {.column width="58%"}
![](img/butterflies.gif){fig-align="center"}
:::
::: {.column width="2%"}
:::
::: {.column width="40%"}
:::
:::
::: footer
<https://giphy.com/gifs/TreehouseDirect-max-and-ruby-maxandruby-maxruby-S3qtrEqiU5OuwAtg5Z>
:::
## Additional resources {.smaller}
- WTF Ch 11 *Debugging R code* <br> <https://rstats.wtf/debugging-r-code.html>
- Advanced R Ch 22 *Debugging* <br> <https://adv-r.hadley.nz/debugging.html>
- Jenny Bryan 2020 RStudio Conf Keynote *Object of type closure is not subsettable* <br> <https://github.com/jennybc/debugging#readme>
- Amanda Gadrow 2018 Webinar *Debugging techniques in RStudio* <br> <https://www.rstudio.com/resources/webinars/debugging-techniques-in-rstudio/>
- Jim Hester 2019 *Introduction to debugging in R and RStudio* <br> <https://www.jimhester.com/talk/2019-crug-debugging/>
- Maëlle Salmon 2021 *How to become a better R code detective?* <br> <https://masalmon.eu/2021/07/13/code-detective/>
- Kara Woo 2019 RStudio Conf *Box plots A case study in debugging and perseverance* <https://www.rstudio.com/resources/rstudioconf-2019/box-plots-a-case-study-in-debugging-and-perseverance/>
::: footer
:::