Class: Lisp::Debug

Inherits:
Object show all
Defined in:
lib/rubymotion/debug.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.eval_in_debug_replObject

Returns the value of attribute eval_in_debug_repl.



11
12
13
# File 'lib/rubymotion/debug.rb', line 11

def eval_in_debug_repl
  @eval_in_debug_repl
end

.interactiveObject

Returns the value of attribute interactive.



11
12
13
# File 'lib/rubymotion/debug.rb', line 11

def interactive
  @interactive
end

.on_entryObject

Returns the value of attribute on_entry.



11
12
13
# File 'lib/rubymotion/debug.rb', line 11

def on_entry
  @on_entry
end

.on_errorObject

Returns the value of attribute on_error.



11
12
13
# File 'lib/rubymotion/debug.rb', line 11

def on_error
  @on_error
end

.single_stepObject

Returns the value of attribute single_step.



11
12
13
# File 'lib/rubymotion/debug.rb', line 11

def single_step
  @single_step
end

.target_envObject

Returns the value of attribute target_env.



11
12
13
# File 'lib/rubymotion/debug.rb', line 11

def target_env
  @target_env
end

.traceObject

Returns the value of attribute trace.



11
12
13
# File 'lib/rubymotion/debug.rb', line 11

def trace
  @trace
end

Class Method Details

.log_eval(sexpr, env) ⇒ Object



43
44
45
46
47
48
49
50
# File 'lib/rubymotion/debug.rb', line 43

def self.log_eval(sexpr, env)
  if !self.eval_in_debug_repl && self.trace
    depth = env.depth
    NSLog("% #d: " % depth)
    print_dashes(depth)
    NSLog("> #{sexpr.to_s}")
  end
end

.log_result(result, env) ⇒ Object



53
54
55
56
57
58
59
60
# File 'lib/rubymotion/debug.rb', line 53

def self.log_result(result, env)
  if !self.eval_in_debug_repl && self.trace
    depth = env.depth
    NSLog("% #d: <" % depth)
    print_dashes(depth)
    NSLog(" #{result.to_s}")
  end
end

def self.log_result(result, env) end



38
39
40
# File 'lib/rubymotion/debug.rb', line 38

def self.print_dashes(level)
  NSLog("-" * level)
end

.process_error(error_message, env) ⇒ Object



26
27
28
# File 'lib/rubymotion/debug.rb', line 26

def self.process_error(error_message, env)
  raise error_message
end

.registerObject



15
16
17
18
19
20
21
22
23
# File 'lib/rubymotion/debug.rb', line 15

def self.register
  self.trace = false
  self.on_error = false
  self.on_entry = []
  self.single_step = false
  self.interactive = false
  self.target_env = nil
  self.eval_in_debug_repl = false
end