Class: Byebug::FrameCommand
Overview
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, #find, inherited, #initialize, load_commands, #match, method_missing, options, #print_subcmds, register_setting_get, register_setting_set, register_setting_var, settings, settings_map
Class Method Details
.help(cmd) ⇒ Object
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
|
# File 'lib/byebug/commands/frame.rb', line 286
def help(cmd)
%{
f[rame] [frame-number [thread thread-number]]
Move the current frame to the specified frame number, or the
0 if no frame-number has been given.
A negative number indicates position from the other end. So
'frame -1' moves to the oldest frame, and 'frame 0' moves to
the newest frame.
Without an argument, the command prints the current stack
frame. Since the current position is redisplayed, it may trigger a
resyncronization if there is a front end also watching over
things.
If a thread number is given then we set the context for evaluating
expressions to that frame of that thread.
}
end
|
.help_command ⇒ Object
282
283
284
|
# File 'lib/byebug/commands/frame.rb', line 282
def help_command
'frame'
end
|
Instance Method Details
#execute ⇒ Object
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
|
# File 'lib/byebug/commands/frame.rb', line 262
def execute
if not @match[1]
pos = 0
else
pos = get_int(@match[1], "Frame")
return unless pos
end
context = @state.context
adjust_frame(pos, true, context)
end
|
#regexp ⇒ Object
254
255
256
257
258
259
260
|
# File 'lib/byebug/commands/frame.rb', line 254
def regexp
/ ^\s*
f(?:rame)?
(?: \s+ (\S+))? \s*
(?: thread \s+ (.*))? \s*
$/x
end
|