Using the Debugger Module #50 Flashcards

1
Q

Where is the “Debugger” tool found?

A

In the sources panel.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a breakpoint in JavaScript?

A

In its simple form, a breakpoint is a breakpoint instruction put in your code. When the browser meets it, it stops.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What’s another way to set a breakpoint in the code?

A

Another option is to open the file in the Sources panel and click the number on the line you want to add a breakpoint:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you remove a breakpoint

A

By double clicking on it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What other kinds of breakpoints are there?

A
  1. XHR/Fetch
  2. DOM
  3. Event Listener (triggered an event occurs like, clicks.)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What’s displayed in the “Scope” panel?

A

Variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What happens inside of the “Watch” panel?

A

There is a small + button that you can use to watch any expression. You can also add expressions or call variables to see what they might do.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the three main ways to control flow during debugging?

A
  1. Normal (highlighted in blue)
  2. Step over (resumes execution until the next line and then stops again.
  3. Step out: goes back to the outer function that is calling the one you’re in.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How could you temporarily edit a script in DevTools?

A

While the script is halted, edit the files and hit command/ctrl S for temporary saving

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can you see what’s in the call stack?

A

The call stack is just below the Debugger and it will tell you how many function levels deep you are in the code.

You can move up too by clicking each function name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

If you don’t want to step into the code because it is a trusted library or script what can you do to avoid inspecting it?

A

Right-click it in the call stack and press Blackbox script.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly