diff options
author | root <root@ghunt-desktop.(none)> | 2010-06-20 15:26:02 (GMT) |
---|---|---|
committer | root <root@ghunt-desktop.(none)> | 2010-06-20 15:26:02 (GMT) |
commit | 2201eeafa41382e5b1c19b5acbc8dee74c904a4b (patch) | |
tree | b26f84e237ab3c58e10f308e045817146f53538f /bin | |
parent | 5f4860099ae80a996e2e4dee85c72c11e170fc8e (diff) |
edit replace fixed, fixes to -from_home-, dreload efforts, no -.pyo's
Diffstat (limited to 'bin')
-rw-r--r-- | bin/continue_debug.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/continue_debug.py b/bin/continue_debug.py index 720102f..724af90 100644 --- a/bin/continue_debug.py +++ b/bin/continue_debug.py @@ -63,8 +63,8 @@ try: db = c.modules.pydebug.pydebug_instance except AttributeError: print('cannot connect to localhost') -except e: - print(e[1]) +except Exception,e: + print(str(e)) assert False #define interface with the command line ipython instance @@ -80,7 +80,7 @@ except: def edit_glue(self,filename,linenumber=0): _logger.debug('position to editor file:%s. Line:%d'%(filename,linenumber)) - if filename.endswith('.pyc'): + if filename.endswith('.pyc') or filename.endswith('.pyo'): filename = filename[:-1] if linenumber > 0: linenumber -= 1 @@ -104,10 +104,16 @@ _logger.debug('child path: %s'%child_path) if not child_path: print _('\n\nThere is no program loaded into the Work Area. \nPlease use the "Project" tab so set up the debug session\n\n') sys.exit(1) + #set the traceback level of detail #ip.options.xmode = db.debug_dict['traceback'] __IPYTHON__.magic_xmode(db.debug_dict['traceback']) _logger.debug('xmode set to %s'%db.debug_dict['traceback']) + +#put module in top level namespace so it can be dreload()-ed +exec 'import ' + db.pdbmodule +exec 'reload(%s)'%db.pdbmodule + """ if this were to work properly we should set go equal to object Macro go_cmd = 'run -d -b %s %s'%(os.path.join(db.pydebug_path,'bin','start_debug.py'),child_path) _logger.debug('defining go: %s'%go_cmd) |