| 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.
| FILE_HISTORY | = | ".rdebug_hist" |
| command_queue | [RW] | |
| histfile | [RW] | |
| history_length | [RW] | |
| history_save | [RW] | |
| restart_file | [RW] |
# 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
# File cli/ruby-debug/interface.rb, line 86
86: def confirm(prompt)
87: readline(prompt, false)
88: end
Things to do before quitting
# 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
# File cli/ruby-debug/interface.rb, line 82
82: def read_command(prompt)
83: readline(prompt, true)
84: end