77 |
key_mgr = plugin['/system/ui/keys'].manager |
key_mgr = plugin['/system/ui/keys'].manager |
78 |
key_mgr.bind("/App/Run/Debugger", :F10) |
key_mgr.bind("/App/Run/Debugger", :F10) |
79 |
|
|
|
|
|
|
# the Debugger service instantiate a new debugger session (generally invoked |
|
|
# from the Run menu) |
|
|
# Create the debugger session and attach it to the dockpane slot. |
|
|
# This will make the debugger session UI appear in the Debugger dockpane |
|
|
#cmd_mgr.add("App/Run/Debugger", "Start Debug Session") do |cmd_slot| |
|
|
# |
|
|
#end |
|
|
|
|
|
|
|
80 |
# Now only is the plugin running |
# Now only is the plugin running |
81 |
plugin.transition(FreeBASE::RUNNING) |
plugin.transition(FreeBASE::RUNNING) |
82 |
end |
end |
245 |
# Stop the debugger session |
# Stop the debugger session |
246 |
# |
# |
247 |
def stop() |
def stop() |
248 |
|
return unless @running |
249 |
@actions['detach_stderr'].invoke(@err) if @err |
@actions['detach_stderr'].invoke(@err) if @err |
250 |
@actions['detach_stdout'].invoke(@out) |
@actions['detach_stdout'].invoke(@out) |
251 |
@actions['detach_stdin'].invoke(@inp) |
@actions['detach_stdin'].invoke(@inp) |
|
@actions['stop'].invoke |
|
252 |
close_pipe() |
close_pipe() |
253 |
show_debugline(@file,nil) |
show_debugline(@file,nil) |
254 |
breakpoint_unsubscribe() |
breakpoint_unsubscribe() |
258 |
end |
end |
259 |
|
|
260 |
## |
## |
|
# close the debugger plugin |
|
|
# |
|
|
def close() |
|
|
@actions['close'].invoke |
|
|
@plugin['/system/ui/current/Debugger'].unlink |
|
|
@active = nil |
|
|
@plugin.log_info << "Debugger plugin closed #{@base_slot.path}" |
|
|
@base_slot.prune |
|
|
end |
|
|
|
|
|
## |
|
261 |
# Show the line in the file the debugger is currently pointing to |
# Show the line in the file the debugger is currently pointing to |
262 |
# open the file if not already loaded in one of the Edit panes. |
# open the file if not already loaded in one of the Edit panes. |
263 |
# If line is nil it removes the line marker, If file is nil do nothing |
# If line is nil it removes the line marker, If file is nil do nothing |
265 |
def show_debugline(file,line) |
def show_debugline(file,line) |
266 |
return if file.nil? |
return if file.nil? |
267 |
ep_slot = @cmd_mgr.command("EditPane/FindFile").invoke(file) |
ep_slot = @cmd_mgr.command("EditPane/FindFile").invoke(file) |
|
# ep_slot = @plugin['/plugins/rubyide_gui-editpane/actions/find_file'].invoke(file) |
|
268 |
|
|
269 |
if ep_slot.nil? |
if ep_slot.nil? |
270 |
ep_slot = @cmd_mgr.command("App/File/Load").invoke(file) |
ep_slot = @cmd_mgr.command("App/File/Load").invoke(file) |
446 |
# more portable Thread approach |
# more portable Thread approach |
447 |
# pipe code: @wr.write("#{cmd}\n"); @wr.flush |
# pipe code: @wr.write("#{cmd}\n"); @wr.flush |
448 |
@action_queue.push(cmd) |
@action_queue.push(cmd) |
449 |
@t.run |
@t.run if @t.status |
450 |
end |
end |
451 |
|
|
452 |
## |
## |