Byebug Notes day 2 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What does byebug do?

A

Byebug is a debugging tool. using byebug we can pause execution, step through our code one line at a time, take a look inside key variables and methods.

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

How do you install byebug?

A

run the following command in your terminal:

[gem install byebug]

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

what should you do before running your file?

A

(1) [require “byebug”]- add to the top of your file to gain access to the gem
(2) [debugger] - place this line at a point in your file where you want to begin debugger mod

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

what does [l -] do

A

list the line numbers in the specified range

example: l 3-20

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

what does [step or s]

A

step into the method call on the current line, if possible

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

what does [next or n ] do?

A
  • move to the next line of executed code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what does[break or b ] do?

A

place a breakpoint at the specified line number, this will pause execution again

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

what does [continue or c] do?

A

resume normal execution of the code until a breakpoint

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

what does [display ] do?

A

automatically show the current value of a variable

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