Class: Connection::Breakpoint::Session
- Inherits:
-
Object
- Object
- Connection::Breakpoint::Session
- Defined in:
- lib/rudebug/connection/breakpoint.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #continue ⇒ Object
- #current_file ⇒ Object
- #current_line ⇒ Object
- #done? ⇒ Boolean
- #eval(code) ⇒ Object
-
#initialize(workspace, title = nil) ⇒ Session
constructor
A new instance of Session.
- #source_code(file) ⇒ Object
-
#step_into ⇒ Object
Safety.
- #step_over ⇒ Object
Constructor Details
#initialize(workspace, title = nil) ⇒ Session
Returns a new instance of Session.
11 12 13 14 15 16 17 |
# File 'lib/rudebug/connection/breakpoint.rb', line 11 def initialize(workspace, title = nil) @workspace = workspace @title = title @done = false Connection::Base.load_rudebug_code(self) end |
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
9 10 11 |
# File 'lib/rudebug/connection/breakpoint.rb', line 9 def title @title end |
Instance Method Details
#continue ⇒ Object
37 38 39 40 |
# File 'lib/rudebug/connection/breakpoint.rb', line 37 def continue() @done = true return nil end |
#current_file ⇒ Object
25 26 27 |
# File 'lib/rudebug/connection/breakpoint.rb', line 25 def current_file() Kernel.eval(eval("bp.file rescue @__bp_file")) end |
#current_line ⇒ Object
29 30 31 |
# File 'lib/rudebug/connection/breakpoint.rb', line 29 def current_line() Kernel.eval(eval("bp.line rescue @__bp_line")).to_i end |
#done? ⇒ Boolean
42 43 44 |
# File 'lib/rudebug/connection/breakpoint.rb', line 42 def done?() @done end |
#eval(code) ⇒ Object
19 20 21 22 23 |
# File 'lib/rudebug/connection/breakpoint.rb', line 19 def eval(code) @workspace.evaluate(nil, code).inspect rescue Exception => e raise(Connection::RemoteException, e.inspect) end |
#source_code(file) ⇒ Object
33 34 35 |
# File 'lib/rudebug/connection/breakpoint.rb', line 33 def source_code(file) Kernel.eval(eval("File.read(%p)" % file)).chomp end |
#step_into ⇒ Object
Safety
47 |
# File 'lib/rudebug/connection/breakpoint.rb', line 47 def step_into() end |
#step_over ⇒ Object
48 |
# File 'lib/rudebug/connection/breakpoint.rb', line 48 def step_over() end |