Class: Connection::Breakpoint::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/rudebug/connection/breakpoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#titleObject (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

#continueObject



37
38
39
40
# File 'lib/rudebug/connection/breakpoint.rb', line 37

def continue()
  @done = true
  return nil
end

#current_fileObject



25
26
27
# File 'lib/rudebug/connection/breakpoint.rb', line 25

def current_file()
  Kernel.eval(eval("bp.file rescue @__bp_file"))
end

#current_lineObject



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

Returns:

  • (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_intoObject

Safety



47
# File 'lib/rudebug/connection/breakpoint.rb', line 47

def step_into() end

#step_overObject



48
# File 'lib/rudebug/connection/breakpoint.rb', line 48

def step_over() end