Class Debugger::LocalInterface
In: cli/ruby-debug/interface.rb
Parent: Interface

A LocalInterface is the kind of I/O interactive performed when the user interface is in the same process as the debugged program. Compare with Debugger::RemoteInterface.

Methods

Constants

FILE_HISTORY = ".rdebug_hist"

Attributes

command_queue  [RW] 
histfile  [RW] 
history_length  [RW] 
history_save  [RW] 
restart_file  [RW] 

Public Class methods

[Source]

    # File cli/ruby-debug/interface.rb, line 63
63:     def initialize()
64:       super
65:       @command_queue = []
66:       @restart_file = nil
67: 
68:       if @have_readline
69:         # take gdb's default
70:         @history_length = ENV['HISTSIZE'] ? ENV['HISTSIZE'].to_i : 256  
71:         @histfile = File.join(ENV['HOME']||ENV['HOMEPATH']||'.', 
72:                               FILE_HISTORY)
73:         open(@histfile, 'r') do |file|
74:           file.each do |line|
75:             line.chomp!
76:             Readline::HISTORY << line
77:           end
78:         end if File.exist?(@histfile)
79:       end
80:     end

Public Instance methods

[Source]

    # File cli/ruby-debug/interface.rb, line 94
94:     def close
95:     end

[Source]

    # File cli/ruby-debug/interface.rb, line 86
86:     def confirm(prompt)
87:       readline(prompt, false)
88:     end

Things to do before quitting

[Source]

     # File cli/ruby-debug/interface.rb, line 98
 98:     def finalize
 99:       if Debugger.method_defined?("annotate") and Debugger.annotate.to_i > 2
100:         print "\032\032exited\n\n" 
101:       end
102:       if Debugger.respond_to?(:save_history)
103:         Debugger.save_history 
104:       end
105:     end

[Source]

    # File cli/ruby-debug/interface.rb, line 90
90:     def print(*args)
91:       STDOUT.printf(*args)
92:     end

[Source]

    # File cli/ruby-debug/interface.rb, line 82
82:     def read_command(prompt)
83:       readline(prompt, true)
84:     end

[Source]

     # File cli/ruby-debug/interface.rb, line 107
107:     def readline_support?
108:       @have_readline
109:     end

[Validate]