42 |
session = nil |
session = nil |
43 |
cmd = cmd_mgr.add("App/Run/Debugger", "&Debugger") do |cmd_slot| |
cmd = cmd_mgr.add("App/Run/Debugger", "&Debugger") do |cmd_slot| |
44 |
unless debugger |
unless debugger |
45 |
debugger = cmd_slot["/system/ui/components/Debugger"].manager.add("debug") |
debugger = base_slot.manager.add |
|
#session = Debugger.new(plugin,slot) |
|
46 |
end |
end |
47 |
end |
end |
48 |
|
|
91 |
# Instantiate a new debugger session . Only one session at a time for now |
# Instantiate a new debugger session . Only one session at a time for now |
92 |
# |
# |
93 |
def initialize(plugin, slot) |
def initialize(plugin, slot) |
94 |
setup(plugin, slot) |
#setup(plugin, slot) |
95 |
|
@plugin = plugin |
96 |
|
@slot = slot |
97 |
@loaded_files = Hash.new |
@loaded_files = Hash.new |
98 |
@running = false |
@running = false |
99 |
@breakpoints = Array.new |
@breakpoints = Array.new |
100 |
@breakpoint_subscribers = Hash.new |
@breakpoint_subscribers = Hash.new |
101 |
@action_queue = Array.new |
@action_queue = Array.new |
102 |
|
|
103 |
#@plugin['/system/ui/current/Debugger'].data = self |
@plugin['/system/ui/current/Debugger'].data = self |
104 |
@plugin.log_info << "Debugger session created #{slot.path}" |
@plugin.log_info << "Debugger session created #{slot.path}" |
105 |
|
self.start |
106 |
end |
end |
107 |
|
|
108 |
|
|
123 |
# to include, command line arguments... |
# to include, command line arguments... |
124 |
file = @plugin['/system/ui/current/EditPane'].manager.file |
file = @plugin['/system/ui/current/EditPane'].manager.file |
125 |
@plugin.log_info << "File to debug : #{file}" |
@plugin.log_info << "File to debug : #{file}" |
126 |
debuggee_file = File.join("plugins","Debugger","debuggee.rb") |
debuggee_file = File.join("#{plugin.plugin_configuration.base_path}","debuggee.rb") |
127 |
command = "ruby -I. -Iso -Iredist -r #{debuggee_file} #{file}" |
command = "ruby -I. -Iso -Iredist -r #{debuggee_file} #{file}" |
128 |
puts command |
puts command |
129 |
|
|
143 |
@debuggee = DRbObject.new(nil, debugUri) |
@debuggee = DRbObject.new(nil, debugUri) |
144 |
debuggeeId = @debuggee.attach(self) |
debuggeeId = @debuggee.attach(self) |
145 |
|
|
146 |
|
|
147 |
if debuggeeId |
if debuggeeId |
148 |
STDERR.print "#{ debuggeeId } attached.\n" |
STDERR.print "#{ debuggeeId } attached.\n" |
149 |
else |
else |