Skip to content

Commit 697ee7f

Browse files
committed
add more about breakpoints/viewing variablesd
1 parent f8e2e07 commit 697ee7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/pages/learn/01_tutorial/08_more-resources/02_debugging.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void magic() {
6464

6565
I've (improperly) implemented the magic method. It's supposed to multiply six times seven and get 42. However, that's not what happens. After (not) much investigation, I am baffled and realize I want to know what the values of `part1` and `part2` are on line 5.
6666

67-
That's what a breakpoint is for. It lets me tell the debugger to pause the program there and let me poke around.
67+
That's what a breakpoint is for. It lets me tell the debugger to pause the program there and let me poke around. How do I set a breakpoint you ask? In the left bar near your code, you can double click (or right click and chose to turn on the breakpoint.) A little circle will appear showing the breakpoint i set.
6868

6969
```java
7070
public class Answer {
@@ -76,15 +76,15 @@ public class Answer {
7676
}
7777
```
7878

79-
When the debugger stops on line 5, I see that part2 is the seven that I expected. However part1 is five,, not six. I found the bug! Thanks to the debugger allowing me to set a breakpoint.
79+
When the debugger stops on line 5, I see that part2 is the seven that I expected. However part1 is five, not six. I found the bug! Thanks to the debugger allowing me to set a breakpoint.
8080

8181
<a id="usage">&nbsp;</a>
8282
## How can debuggers be used?
8383

8484
There are a number of reasons why you might want to use a debugger. Three of the most common are:
8585

8686
1. Fixing broken code - The debugger allows you to see the values of variables as the code runs. This allows you to see where it stops behaving as expected.
87-
2. Understanding unfamiliar code - Seeing the values as the code runs can help you understand it better
87+
2. Understanding unfamiliar code - Seeing the values of each variable as the code runs can help you understand it better
8888
3. Tracing the path of the code - When stopping at a breakpoint, the debugger shows what classes/methods were called in order to get there. You can even click on them to see what the variables in scope at those points are.
8989

9090
<a id="basic">&nbsp;</a>

0 commit comments

Comments
 (0)