def StartDebugServer(): sys.path.append('c:/Path/To/Boa') from Debugger.RemoteServer import start start('', '') # username, password return 'Debug Server started, attach to it from the IDE.'
def StartDebugServer(): sys.path.append("c:/Path/To/Boa") from Debugger.RemoteServer import start start("", "") # username, password return "Debug Server started, attach to it from the IDE."
def hook_debugger(tpe, val, tb): traceback.print_exception(tpe, val, tb) #if sys.modules.has_key('wxPython.wx'): import wx if wx.MessageBox('%s: %s\n\nStart DebugServer?' % (tpe, val), 'Uncaught Exception', wx.ICON_ERROR | wx.YES_NO) == wx.NO: return if not hasattr(sys, 'debugger_control'): sys.path.append(path_to_boa) from Debugger.RemoteServer import start start(username='', password='') sys.debugger_control.post_mortem((tpe, val, tb))
def hook_debugger(tpe, val, tb): traceback.print_exception(tpe, val, tb) #if sys.modules.has_key('wxPython.wx'): import wx if wx.MessageBox('%s: %s\n\nStart DebugServer?'%(tpe, val), 'Uncaught Exception', wx.ICON_ERROR | wx.YES_NO) == wx.NO: return if not hasattr(sys, 'debugger_control'): sys.path.append(path_to_boa) from Debugger.RemoteServer import start start(username='', password='') sys.debugger_control.post_mortem( (tpe, val, tb) )
return (_doDebug, _startupfile, _startupModules, _constricted, _emptyEditor, _doRemoteDebugSvr, _blockSocketServer, _wxVersionSelect, _unicodeEncoding, optlist, args) # This happens as early as possible (before wxPython loads) to make filename # transfer to a running Boa as quick as possible and little NS pollution if __name__ == '__main__' and len(sys.argv) > 1: (doDebug, startupfile, startupModules, constricted, emptyEditor, doDebugSvr, blockSocketServer, wxVersionSelect, unicodeEncoding, opts, args) = processArgs(sys.argv[1:]) if doDebugSvr and startupModules: print 'Running as a Remote Debug Server' from Debugger.RemoteServer import start # XXX username, password optionally should be on the command-line start(username='', password='') # startupModules contain everything from the first filename and on sys.argv = startupModules sys.path.insert(0, os.path.abspath(os.path.dirname(sys.argv[0]))) execfile(sys.argv[0], {'__name__': '__main__', '__builtins__': __builtins__}) sys.exit() # Try connect to running Boa using sockets, tnx to Tim Hochberg if not blockSocketServer and startupModules and server_mode: if sendToRunningBoa(startupModules): print 'Transfered arguments to running Boa, exiting.' sys.exit()