byebug 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/GUIDE.md +231 -0
- data/README.md +195 -7
- data/bin/byebug +1 -5
- data/byebug.gemspec +34 -35
- data/lib/byebug.rb +2 -5
- data/lib/byebug/command.rb +13 -13
- data/lib/byebug/commands/breakpoints.rb +1 -1
- data/lib/byebug/commands/control.rb +1 -1
- data/lib/byebug/commands/frame.rb +1 -1
- data/lib/byebug/commands/info.rb +1 -1
- data/lib/byebug/commands/list.rb +5 -5
- data/lib/byebug/commands/reload.rb +7 -10
- data/lib/byebug/commands/{irb.rb → repl.rb} +49 -13
- data/lib/byebug/commands/set.rb +10 -6
- data/lib/byebug/commands/show.rb +4 -7
- data/lib/byebug/commands/trace.rb +2 -2
- data/lib/byebug/context.rb +3 -5
- data/lib/byebug/helper.rb +2 -2
- data/lib/byebug/interface.rb +3 -0
- data/lib/byebug/processor.rb +2 -2
- data/lib/byebug/version.rb +1 -1
- data/old_doc/byebug.1 +1 -2
- data/old_doc/byebug.texi +125 -126
- data/old_doc/hanoi.rb +2 -3
- data/old_doc/triangle.rb +6 -7
- data/test/breakpoints_test.rb +43 -33
- data/test/display_test.rb +1 -1
- data/test/edit_test.rb +20 -15
- data/test/eval_test.rb +32 -26
- data/test/examples/list.rb +12 -1
- data/test/frame_test.rb +56 -43
- data/test/help_test.rb +11 -8
- data/test/info_test.rb +18 -13
- data/test/list_test.rb +74 -80
- data/test/method_test.rb +1 -3
- data/test/reload_test.rb +3 -3
- data/test/repl_test.rb +112 -0
- data/test/restart_test.rb +72 -70
- data/test/set_test.rb +43 -27
- data/test/show_test.rb +97 -102
- data/test/source_test.rb +6 -10
- data/test/stepping_test.rb +45 -49
- data/test/support/test_dsl.rb +47 -55
- data/test/test_helper.rb +2 -2
- data/test/trace_test.rb +4 -4
- data/test/variables_test.rb +10 -8
- metadata +9 -10
- data/old_doc/Makefile +0 -20
- data/test/examples/edit2.rb +0 -3
- data/test/irb_test.rb +0 -85
@@ -3,7 +3,7 @@ module Byebug
|
|
3
3
|
class TraceCommand < Command
|
4
4
|
def regexp
|
5
5
|
/^\s* tr(?:ace)? (?: \s+ (\S+)) # on | off | var(iable)
|
6
|
-
(?: \s+ (\S+))? # (
|
6
|
+
(?: \s+ (\S+))? # (variable-name)?
|
7
7
|
(?: \s+ (\S+))? \s* # (stop | nostop)?
|
8
8
|
$/ix
|
9
9
|
end
|
@@ -12,7 +12,7 @@ module Byebug
|
|
12
12
|
if @match[1] =~ /on|off/
|
13
13
|
onoff = 'on' == @match[1]
|
14
14
|
Byebug.tracing = onoff
|
15
|
-
print "
|
15
|
+
print "#{show_setting('linetrace')}\n"
|
16
16
|
elsif @match[1] =~ /var(?:iable)?/
|
17
17
|
varname=@match[2]
|
18
18
|
if debug_eval("defined?(#{varname})")
|
data/lib/byebug/context.rb
CHANGED
@@ -20,10 +20,6 @@ module Byebug
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
def interrupt
|
24
|
-
self.stop_next = 1
|
25
|
-
end
|
26
|
-
|
27
23
|
def handler
|
28
24
|
Byebug.handler or raise 'No interface loaded'
|
29
25
|
end
|
@@ -41,7 +37,9 @@ module Byebug
|
|
41
37
|
end
|
42
38
|
|
43
39
|
def at_line(file, line)
|
44
|
-
handler.at_line(self, file, line)
|
40
|
+
handler.at_line(self, file, line) unless
|
41
|
+
defined?(Byebug::BYEBUG_SCRIPT) and
|
42
|
+
File.identical?(file, Byebug::BYEBUG_SCRIPT)
|
45
43
|
end
|
46
44
|
|
47
45
|
#def at_return(file, line)
|
data/lib/byebug/helper.rb
CHANGED
@@ -43,13 +43,13 @@ module Byebug
|
|
43
43
|
return false
|
44
44
|
else
|
45
45
|
if print_error
|
46
|
-
print "Expecting 'on', 1, 'off', or 0. Got:
|
46
|
+
print "Expecting 'on', 1, 'off', or 0. Got: #{arg.to_s}.\n"
|
47
47
|
raise RuntimeError
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
-
# Return 'on' or 'off' for supplied parameter. The
|
52
|
+
# Return 'on' or 'off' for supplied parameter. The parameter should
|
53
53
|
# be true, false or nil.
|
54
54
|
def show_onoff(bool)
|
55
55
|
if not [TrueClass, FalseClass, NilClass].member?(bool.class)
|
data/lib/byebug/interface.rb
CHANGED
data/lib/byebug/processor.rb
CHANGED
@@ -86,7 +86,7 @@ module Byebug
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def self.print_location_and_text(file, line)
|
89
|
-
file_line = "#{canonic_file(file)}
|
89
|
+
file_line = "#{canonic_file(file)} @ #{line}\n" \
|
90
90
|
"#{Byebug.line_at(file, line)}\n"
|
91
91
|
|
92
92
|
# FIXME: use annotations routines
|
@@ -232,7 +232,7 @@ module Byebug
|
|
232
232
|
|
233
233
|
preloop(commands, context)
|
234
234
|
|
235
|
-
if
|
235
|
+
if Command.settings[:autolist] == 0
|
236
236
|
CommandProcessor.print_location_and_text(file, line)
|
237
237
|
end
|
238
238
|
|
data/lib/byebug/version.rb
CHANGED
data/old_doc/byebug.1
CHANGED
data/old_doc/byebug.texi
CHANGED
@@ -1,11 +1,8 @@
|
|
1
|
-
\input texinfo
|
1
|
+
\input texinfo
|
2
2
|
@setfilename byebug.info
|
3
3
|
|
4
|
-
@set
|
5
|
-
@set
|
6
|
-
@set BYEBUG_VERSION 1.0.3
|
7
|
-
@set EDITION 1.0.3
|
8
|
-
@set UPDATED April-2013
|
4
|
+
@set BYEBUG_VERSION 1.1.1
|
5
|
+
@set UPDATED May-2013
|
9
6
|
|
10
7
|
@macro Example {}
|
11
8
|
@iftex
|
@@ -42,19 +39,10 @@
|
|
42
39
|
@titlepage
|
43
40
|
@title Debugging with @code{byebug}
|
44
41
|
@sp 1
|
45
|
-
@subtitle @value{
|
42
|
+
@subtitle @value{BYEBUG_VERSION} Edition
|
46
43
|
@subtitle @value{UPDATED-MONTH}
|
47
|
-
@author Rocky Bernstein, Kent Sibilev, and Mark Moseley
|
44
|
+
@author David Rodríguez, Rocky Bernstein, Kent Sibilev, and Mark Moseley
|
48
45
|
@page
|
49
|
-
@ifset WHERETO
|
50
|
-
@tex
|
51
|
-
{\parskip=0pt
|
52
|
-
\hfill (Send bugs and comments on byebug to fill in...)\par
|
53
|
-
\hfill {\it Debugging with {\tt byebug}\par
|
54
|
-
\hfill \TeX{}info \texinfoversion\par
|
55
|
-
}
|
56
|
-
@end tex
|
57
|
-
@end ifset
|
58
46
|
@end titlepage
|
59
47
|
@page
|
60
48
|
|
@@ -64,7 +52,7 @@
|
|
64
52
|
|
65
53
|
This file describes Byebug, a Ruby 2.0 debugger, version @value{BYEBUG_VERSION}
|
66
54
|
|
67
|
-
|
55
|
+
Last updated: @value{UPDATED}
|
68
56
|
@c Copyleft (U+0254) 2013
|
69
57
|
|
70
58
|
@menu
|
@@ -91,10 +79,9 @@ Indexes
|
|
91
79
|
@chapter Summary of @code{byebug}
|
92
80
|
|
93
81
|
The purpose of a debugger such as @code{byebug} is to allow you to see what is
|
94
|
-
going on ``inside'' a Ruby program while it executes.
|
95
|
-
|
96
|
-
|
97
|
-
these) to help you catch bugs in the act:
|
82
|
+
going on ``inside'' a Ruby program while it executes. @code{byebug} can do four
|
83
|
+
main kinds of things (plus other things in support of these) to help you catch
|
84
|
+
bugs in the act:
|
98
85
|
|
99
86
|
@itemize @bullet
|
100
87
|
@item
|
@@ -111,20 +98,19 @@ Change things in your script, so you can experiment with correcting the effects
|
|
111
98
|
of one bug and go on to learn about another.
|
112
99
|
@end itemize
|
113
100
|
|
114
|
-
Although you can use @
|
101
|
+
Although you can use @code{byebug} to invoke your Ruby programs via a debugger
|
115
102
|
at the outset, there are other ways to use and enter the debugger.
|
116
103
|
|
117
104
|
@menu
|
118
|
-
* First Sample Session::
|
119
|
-
* Second Sample Session::
|
105
|
+
* First Sample Session:: @code{display}, @code{print}, @code{quit}
|
106
|
+
* Second Sample Session:: @code{where}, @code{frame}, @code{restart}, @code{autoeval}, @code{break}, @code{ps}
|
120
107
|
* Unit Testing Session:: Using byebug in unit testing
|
121
108
|
* Byebug.start with a block:: Using the Byebug.start with a block
|
122
109
|
* Debugging Oddities:: How debugging Ruby may be different...
|
123
110
|
@end menu
|
124
111
|
|
125
112
|
@node First Sample Session
|
126
|
-
@section
|
127
|
-
@code{print}, and @code{quit})
|
113
|
+
@section First Sample Session
|
128
114
|
|
129
115
|
You can use this manual at your leisure to read all about @code{byebug}.
|
130
116
|
However, a handful of commands are enough to get started using byebug. The
|
@@ -145,40 +131,18 @@ than how to write short Ruby code.}
|
|
145
131
|
|
146
132
|
@smallexample
|
147
133
|
$ @b{byebug triangle.rb}
|
148
|
-
triangle.rb
|
149
|
-
|
150
|
-
|
151
|
-
1
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
8 end
|
159
|
-
(byebug:1) @b{l}
|
160
|
-
[9, 13] in ./triangle.rb
|
161
|
-
9 tri
|
162
|
-
10 end
|
163
|
-
11
|
164
|
-
12 t = triangle(3)
|
165
|
-
13 puts t
|
166
|
-
(byebug:1) @b{list 1,100}
|
167
|
-
[1, 100] in ./triangle.rb
|
168
|
-
1 #!/usr/bin/env ruby
|
169
|
-
2 # Compute the n'th triangle number - the hard way
|
170
|
-
3 # triangle(n) == (n * (n+1)) / 2
|
171
|
-
=> 4 def triangle(n)
|
172
|
-
5 tri = 0
|
173
|
-
6 0.upto(n) do |i|
|
174
|
-
7 tri += i
|
175
|
-
8 end
|
176
|
-
9 tri
|
134
|
+
[1, 10] in /home/davidr/Proyectos/byebug/old_doc/triangle.rb
|
135
|
+
1 #!/usr/bin/env ruby
|
136
|
+
2 # Compute the n'th triangle number - the hard way
|
137
|
+
3 # triangle(n) == (n * (n+1)) / 2
|
138
|
+
=> 4 def triangle(n)
|
139
|
+
5 tri = 0
|
140
|
+
6 0.upto(n) do |i|
|
141
|
+
7 tri += i
|
142
|
+
8 end
|
143
|
+
9 tri
|
177
144
|
10 end
|
178
|
-
|
179
|
-
12 t = triangle(3)
|
180
|
-
13 puts t
|
181
|
-
(byebug:1)
|
145
|
+
(byebug)
|
182
146
|
@end smallexample
|
183
147
|
|
184
148
|
@noindent
|
@@ -186,51 +150,67 @@ triangle.rb:4 def hanoi(n,a,b,c)
|
|
186
150
|
There are lots of command options, but we don't need them for now. See
|
187
151
|
@ref{byebug command-line options} for a full list of command options.
|
188
152
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
does not exist so issuing a method call of @code{triangle} will raise a
|
196
|
-
``method not found'' error.
|
153
|
+
We are currently stopped before the first executable line of the program; this
|
154
|
+
is line 4 of @code{triangle.rb}. If you are used to less dynamic languages and
|
155
|
+
have used debuggers for more statically compiled languages like C, C++, or Java,
|
156
|
+
it may seem odd to be stopped before a function definition but in Ruby line 4 is
|
157
|
+
executed, the name @code{triangle} (probably) does not exist so issuing a method
|
158
|
+
call of @code{triangle} will raise a ``method not found'' error.
|
197
159
|
|
198
160
|
@code{byebug}'s prompt is @code{(byebug)}. If the program has died and you are
|
199
|
-
in post-mortem debugging @code{byebug:post-mortem} is used instead. If the
|
161
|
+
in post-mortem debugging @code{(byebug:post-mortem)} is used instead. If the
|
200
162
|
program has terminated normally, the string this position will be
|
201
|
-
@code{byebug:ctrl}. The commands which are available change depending on the
|
163
|
+
@code{(byebug:ctrl)}. The commands which are available change depending on the
|
202
164
|
program's state.
|
203
165
|
|
204
|
-
|
205
|
-
|
206
|
-
the range byebug would like to show is -1..8. However since
|
207
|
-
before the current line,
|
208
|
-
|
209
|
-
abbreviated with @code{l} which is what we use next. Notice that when we use
|
210
|
-
this a second time, we continue listing from the place we last left off. The
|
211
|
-
desired range of lines this time is lines 9 to 18; but since the program ends at
|
212
|
-
line 13, only the remaining 5 lines are shown.
|
213
|
-
|
214
|
-
If you want to set how many lines to print by default rather than use the
|
215
|
-
initial number of lines, 10, use the @code{set listsize} command
|
216
|
-
(@pxref{Listsize}). To see the entire program in one shot, we gave an explicit
|
217
|
-
starting and ending line number.
|
166
|
+
Byebug automatically lists 10 lines of code centered around the current line
|
167
|
+
everytime it is stopped. The current line here is line 4 and is marked with
|
168
|
+
@code{=>}, so the range byebug would like to show is [-1..8]. However since
|
169
|
+
there aren't 5 lines before the current line, the range is moved ``up'' so we
|
170
|
+
can actually display 10 lines of code.
|
218
171
|
|
219
172
|
Now let us step through the program.
|
220
173
|
|
221
174
|
@smallexample
|
222
|
-
(byebug
|
223
|
-
triangle.rb
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
tri
|
228
|
-
|
175
|
+
(byebug) @b{step}
|
176
|
+
[4, 13] in /home/davidr/Proyectos/byebug/old_doc/triangle.rb
|
177
|
+
4 def triangle(n)
|
178
|
+
5 tri = 0
|
179
|
+
6 0.upto(n) do |i|
|
180
|
+
7 tri += i
|
181
|
+
8 end
|
182
|
+
9 tri
|
183
|
+
10 end
|
184
|
+
11
|
185
|
+
=> 12 t = triangle(3)
|
186
|
+
13 puts t
|
187
|
+
(byebug) @b{@key{<RET>}}
|
188
|
+
[1, 10] in /home/davidr/Proyectos/byebug/old_doc/triangle.rb
|
189
|
+
1 #!/usr/bin/env ruby
|
190
|
+
2 # Compute the n'th triangle number - the hard way
|
191
|
+
3 # triangle(n) == (n * (n+1)) / 2
|
192
|
+
4 def triangle(n)
|
193
|
+
=> 5 tri = 0
|
194
|
+
6 0.upto(n) do |i|
|
195
|
+
7 tri += i
|
196
|
+
8 end
|
197
|
+
9 tri
|
198
|
+
10 end
|
199
|
+
(byebug) @b{p tri}
|
229
200
|
nil
|
230
|
-
(byebug
|
231
|
-
triangle.rb
|
232
|
-
|
233
|
-
|
201
|
+
(byebug) @b{step}
|
202
|
+
[1, 10] in /home/davidr/Proyectos/byebug/old_doc/triangle.rb
|
203
|
+
1 #!/usr/bin/env ruby
|
204
|
+
2 # Compute the n'th triangle number - the hard way
|
205
|
+
3 # triangle(n) == (n * (n+1)) / 2
|
206
|
+
4 def triangle(n)
|
207
|
+
5 tri = 0
|
208
|
+
=> 6 0.upto(n) do |i|
|
209
|
+
7 tri += i
|
210
|
+
8 end
|
211
|
+
9 tri
|
212
|
+
10 end
|
213
|
+
(byebug) @b{p tri}
|
234
214
|
0
|
235
215
|
@end smallexample
|
236
216
|
|
@@ -256,45 +236,53 @@ Now let us run the program until we return from the function. We'll want to see
|
|
256
236
|
which lines get run.
|
257
237
|
|
258
238
|
@smallexample
|
259
|
-
(byebug
|
239
|
+
(byebug) @b{display i}
|
260
240
|
2: i =
|
261
|
-
(byebug
|
241
|
+
(byebug) @b{set linetrace on}
|
262
242
|
line tracing is on.
|
263
|
-
(byebug
|
264
|
-
Tracing
|
243
|
+
(byebug) @b{finish}
|
244
|
+
Tracing: /home/davidr/Proyectos/byebug/old_doc/triangle.rb:7 tri += i
|
265
245
|
1: tri = 0
|
266
246
|
2: i = 0
|
267
|
-
Tracing
|
247
|
+
Tracing: /home/davidr/Proyectos/byebug/old_doc/triangle.rb:7 tri += i
|
268
248
|
1: tri = 0
|
269
249
|
2: i = 1
|
270
|
-
Tracing
|
250
|
+
Tracing: /home/davidr/Proyectos/byebug/old_doc/triangle.rb:7 tri += i
|
271
251
|
1: tri = 1
|
272
252
|
2: i = 2
|
273
|
-
Tracing
|
253
|
+
Tracing: /home/davidr/Proyectos/byebug/old_doc/triangle.rb:7 tri += i
|
274
254
|
1: tri = 3
|
275
255
|
2: i = 3
|
276
|
-
Tracing
|
256
|
+
Tracing: /home/davidr/Proyectos/byebug/old_doc/triangle.rb:9 tri
|
277
257
|
1: tri = 6
|
278
|
-
2: i =
|
279
|
-
|
280
|
-
Tracing(1):triangle.rb:13 puts t
|
258
|
+
2: i =
|
259
|
+
Tracing: /home/davidr/Proyectos/byebug/old_doc/triangle.rb:13 puts t
|
281
260
|
1: tri =
|
282
261
|
2: i =
|
262
|
+
[4, 13] in /home/davidr/Proyectos/byebug/old_doc/triangle.rb
|
263
|
+
4 def triangle(n)
|
264
|
+
5 tri = 0
|
265
|
+
6 0.upto(n) do |i|
|
266
|
+
7 tri += i
|
267
|
+
8 end
|
268
|
+
9 tri
|
269
|
+
10 end
|
270
|
+
11
|
271
|
+
12 t = triangle(3)
|
272
|
+
=> 13 puts t
|
283
273
|
1: tri =
|
284
274
|
2: i =
|
285
|
-
|
286
|
-
puts t
|
287
|
-
(byebug:1) @b{quit}
|
275
|
+
(byebug) @b{quit}
|
288
276
|
Really quit? (y/n) @b{y}
|
289
277
|
@end smallexample
|
290
278
|
|
291
279
|
So far, so good. As you can see from the above to get out of @code{byebug}, one
|
292
280
|
can issue a @code{quit} command (@code{q} and @code{exit} are just as good). If
|
293
281
|
you want to quit without being prompted, suffix the command with an exclamation
|
294
|
-
mark, e.g
|
282
|
+
mark, e.g. @code{q!}.
|
295
283
|
|
296
284
|
@node Second Sample Session
|
297
|
-
@section Sample Session 2: Delving Deeper
|
285
|
+
@section Second Sample Session 2: Delving Deeper
|
298
286
|
|
299
287
|
In this section we'll introduce breakpoints, the call stack and restarting. So
|
300
288
|
far we've been doing pretty good in that we've not encountered a bug to fix.
|
@@ -897,7 +885,7 @@ To be continued...
|
|
897
885
|
@end ifset
|
898
886
|
|
899
887
|
@node Invocation
|
900
|
-
@chapter Getting in
|
888
|
+
@chapter Getting in & out
|
901
889
|
|
902
890
|
@menu
|
903
891
|
* Starting byebug:: How to enter byebug
|
@@ -1156,11 +1144,8 @@ command, @pxref{Source}.
|
|
1156
1144
|
@node Quitting byebug
|
1157
1145
|
@section Quitting byebug
|
1158
1146
|
|
1159
|
-
@
|
1160
|
-
|
1161
|
-
terminates the action of any @code{byebug} command that is in progress and
|
1162
|
-
returns to @code{byebug} command level. Inside a debugger command interpreter,
|
1163
|
-
use @code{quit} command (@pxref{Control, ,Quitting byebug}).
|
1147
|
+
Inside a byebug interpreter, use @code{quit} command (
|
1148
|
+
@pxref{Control, ,Quitting byebug}).
|
1164
1149
|
|
1165
1150
|
Another way to terminate byebug is to use the @code{kill} command. This does the
|
1166
1151
|
more forceful @code{kill -9}. It can be used in cases where @code{quit} doesn't
|
@@ -1241,7 +1226,7 @@ require "byebug/byebug"
|
|
1241
1226
|
* Command Syntax:: How to give commands to byebug
|
1242
1227
|
* Command Output:: How byebug presents its output
|
1243
1228
|
* Help:: How to ask for help (help)
|
1244
|
-
* Control:: Controlling byebug (quit, restart
|
1229
|
+
* Control:: Controlling byebug (quit, restart)
|
1245
1230
|
* DisplayCommands:: Executing expressions on stop (display, undisplay)
|
1246
1231
|
* PrintCommands:: Evaluating and Printing Expressions (p, pp, ps, pp, irb)
|
1247
1232
|
* PrintVars:: Printing Variables (var)
|
@@ -1430,12 +1415,11 @@ With an integer argument, list info on that breakpoint.
|
|
1430
1415
|
@end example
|
1431
1416
|
|
1432
1417
|
@node Control
|
1433
|
-
@section Controlling byebug (@samp{quit}, @samp{restart}, @samp{
|
1418
|
+
@section Controlling byebug (@samp{quit}, @samp{restart}, @samp{source})
|
1434
1419
|
|
1435
1420
|
@menu
|
1436
1421
|
* Quit:: Quitting byebug (quit)
|
1437
|
-
* Restart:: Restarting
|
1438
|
-
* Interrupt:: Interrupting byebug (interrupt)
|
1422
|
+
* Restart:: Restarting script execution (restart)
|
1439
1423
|
* Source:: Running Byebug commands (source)
|
1440
1424
|
@end menu
|
1441
1425
|
|
@@ -1458,7 +1442,7 @@ if you really want to quit. If you don't want any questions asked, enter
|
|
1458
1442
|
@end table
|
1459
1443
|
|
1460
1444
|
@node Restart
|
1461
|
-
@subsection
|
1445
|
+
@subsection Restarting script execution (@samp{restart})
|
1462
1446
|
|
1463
1447
|
@table @code
|
1464
1448
|
@kindex restart @r{[}@var{program args}@r{]}
|
@@ -1786,6 +1770,20 @@ Implicitly there is a default line location. Each time a list command is run
|
|
1786
1770
|
that implicit location is updated, so that running several list commands in
|
1787
1771
|
succession shows a contiguous block of program text.
|
1788
1772
|
|
1773
|
+
If you don't need code context displayed every time, you can issue the @code{set
|
1774
|
+
noautolist} command. Now whenever you want code listed, you can explicitly issue
|
1775
|
+
the @code{list} or it abbreviation @code{l}. Notice that a second listing is
|
1776
|
+
displayed, we continue listing from the place we last left off. The desired
|
1777
|
+
range of lines this time is lines 9 to 18; but since the program ends at line
|
1778
|
+
13, the range is moved down so 10 lines can be shown. You can set the
|
1779
|
+
@code{noautolist} option by default by dropping @code{set noautolist} in
|
1780
|
+
byebug's startup file @code{.byebugrc}.
|
1781
|
+
|
1782
|
+
If you want to set how many lines to print by default rather than use the
|
1783
|
+
initial number of lines, 10, use the @code{set listsize} command
|
1784
|
+
(@pxref{Listsize}). To see the entire program in one shot, we gave an explicit
|
1785
|
+
starting and ending line number.
|
1786
|
+
|
1789
1787
|
You can print other portions of source files by giving an explicit position as a
|
1790
1788
|
parameter to the list command.
|
1791
1789
|
|
@@ -2983,11 +2981,11 @@ Boolean. True if currently testing byebug.
|
|
2983
2981
|
@item :force_stepping
|
2984
2982
|
Boolean. True if stepping should go to a line different from the last
|
2985
2983
|
step. @xref{Forcestep}.
|
2986
|
-
@item :
|
2984
|
+
@item :frame_fullpath
|
2987
2985
|
Boolean. @xref{Fullpath}.
|
2988
2986
|
@item :listsize
|
2989
2987
|
Fixnum. Number of lines to show in a @code{list} command. @xref{Listsize}.
|
2990
|
-
@item :
|
2988
|
+
@item :autoreload
|
2991
2989
|
Boolean. True if we should reread the source every time it changes. @xref{Autoreload}.
|
2992
2990
|
@item :stack_trace_on_error
|
2993
2991
|
Boolean. True if we should produce a stack trace on error. @xref{Trace}.
|
@@ -3268,10 +3266,11 @@ need to first call @samp{Byebug.start} before issuing this call.
|
|
3268
3266
|
@appendix Guidelines for contributing
|
3269
3267
|
|
3270
3268
|
@menu
|
3271
|
-
* Running Regression Tests
|
3269
|
+
* Testing Byebug:: Running Regression Tests
|
3272
3270
|
@end menu
|
3273
3271
|
|
3274
|
-
@
|
3272
|
+
@node Testing Byebug
|
3273
|
+
@section Testing Byebug
|
3275
3274
|
|
3276
3275
|
We've put together some basic tests to make sure byebug is doing
|
3277
3276
|
what we think it should do. To run these (from @code{trunk}):
|