Changeset 84

Show
Ignore:
Timestamp:
04/08/05 21:48:47 (7 years ago)
Author:
mj
Message:

Unload wingdb and netserver modules when stopping the debugger. This removes the restriction that changing the Wing home dir after the debugger has already started requires a Zope restart.

Location:
WingDBG/trunk/WingDBG
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • WingDBG/trunk/WingDBG/WingDBG.py

    r83 r84  
    227227        return not not findInternalWinghome(self.wing_home) 
    228228 
    229     security.declareProtected(VIEW_PERMISSION, 'debugStubLoaded') 
    230     def debugStubLoaded(self): 
    231         """Return true if wingdbg has already been imported once""" 
    232         return gNetServer is not None 
    233  
    234229    security.declareProtected(VIEW_PERMISSION, 'getProfileDir') 
    235230    def getProfileDir(self): 
     
    309304            if self.script_support: 
    310305                ScriptDebugging.unpatch() 
     306                 
     307            self._unload_wingdb_modules() 
    311308         
    312309    security.declareProtected(USE_PERMISSION, 'connectIDE') 
     
    362359        return gNetServer 
    363360     
     361    security.declarePrivate('_unload_wingdb_modules') 
     362    def _unload_wingdb_modules(self): 
     363        """Remove the Wing debugger modules 
     364         
     365        This so we can load them from a different location if our winghome 
     366        is changed. 
     367         
     368        """ 
     369        for name in ('wingdb', 'netserver'): 
     370            if sys.modules.has_key(name): 
     371                del sys.modules[name] 
     372 
    364373    security.declarePrivate('__create_debugger') 
    365374    def __create_debugger(self): 
  • WingDBG/trunk/WingDBG/www/configure.pt

    r76 r84  
    2828                               not here.wingHomeIsValid()"> 
    2929        This is not a valid Wing installation. Please verify the path. 
    30     </div> 
    31     <div class="system-msg" style="color: red"  
    32          tal:condition="here/debugStubLoaded"> 
    33          Wing debug module already loaded once;  
    34          changes to the Wing home will not take effect until after a  
    35          Zope restart. 
    3630    </div> 
    3731    <div class="form-help">