Sha256: 052f286a6badaeeb37d69016be42b332ff7bd4d403635f6c6dbfc7ba1153285b
Contents?: true
Size: 1.37 KB
Versions: 4
Compression:
Stored size: 1.37 KB
Contents
# -*- Ruby -*- # Copyright (C) 2010 Rocky Bernstein <rockyb@rubyforge.net> # We use this as the default startup file for irb inside trepan # Down the line we will have a way for folks to add/override this # with their own file. IRB.conf[:PROMPT_MODE] = :SIMPLE IRB.conf[:PROMPT][:SIMPLE] = {:PROMPT_C=>"trepanx ?> ", :PROMPT_I=>"trepanx >> ", :PROMPT_N=>"trepanx >> ", :PROMPT_S=>nil, :RETURN=>"=> %s\n"} # Using dbgr to issue a debugger statement inside irb: # dbgr %w(info program) # dbgr 'info program' # also works # But... # dbgr info program # wrong! # puts "You are in a trepan session. You should have access to program scope." puts "'dbgr', 'step', 'ne', 'q', 'cont' commands have been added." if defined?($trepanx) && $trepanx puts 'You should have access to debugger state via global variable $trepanx' end if defined?($trepanx_frame) && $trepanx_frame puts 'You should have access to the program frame via global variable $trepanx_frame' end if defined?($trepanx_cmdproc) && $trepanx_cmdproc puts 'You should have access to the command processor via global variable $trepanx_cmdproc' end # Monkeypatch to save the current IRB statement to be run. class IRB::Context alias_method :_trepanx_original_evaluate, :evaluate def evaluate(line, line_no) $trepanx_irb_statements = line _trepanx_original_evaluate(line, line_no) end end
Version data entries
4 entries across 4 versions & 1 rubygems