| Class | Debugger::SourceCommand |
| In: |
cli/ruby-debug/commands/source.rb
|
| Parent: | Command |
Implements debugger "source" command.
# File cli/ruby-debug/commands/source.rb, line 28
28: def help(cmd)
29: %{
30: source FILE\texecutes a file containing debugger commands
31: }
32: end
# File cli/ruby-debug/commands/source.rb, line 10
10: def execute
11: file = File.expand_path(@match[1]).strip
12: unless File.exist?(file)
13: errmsg "Command file '#{file}' is not found\n"
14: return
15: end
16: if @state and @state.interface
17: @state.interface.command_queue += File.open(file).readlines
18: else
19: Debugger.run_script(file, @state)
20: end
21: end