Wed, 27 Jun 2018 18:44:54 +0200
DebugServer: fixed an issue handling changed Python interpreter/virtual environment settings
--- a/APIs/Python3/eric6.api Wed Jun 27 18:43:11 2018 +0200 +++ b/APIs/Python3/eric6.api Wed Jun 27 18:44:54 2018 +0200 @@ -432,7 +432,7 @@ eric6.Debugger.DebugServer.DebugServer.passiveDebugStarted?7 eric6.Debugger.DebugServer.DebugServer.passiveStartUp?4(fn, exc) eric6.Debugger.DebugServer.DebugServer.preferencesChanged?4() -eric6.Debugger.DebugServer.DebugServer.registerDebuggerInterface?4(interfaceName, getRegistryData) +eric6.Debugger.DebugServer.DebugServer.registerDebuggerInterface?4(interfaceName, getRegistryData, reregister=False) eric6.Debugger.DebugServer.DebugServer.remoteBanner?4() eric6.Debugger.DebugServer.DebugServer.remoteBreakpoint?4(fn, line, setBreakpoint, cond=None, temp=False) eric6.Debugger.DebugServer.DebugServer.remoteCapabilities?4()
--- a/Debugger/DebugServer.py Wed Jun 27 18:43:11 2018 +0200 +++ b/Debugger/DebugServer.py Wed Jun 27 18:44:54 2018 +0200 @@ -301,14 +301,15 @@ registeredInterfaces[interfaceName] = \ self.__debuggerInterfaces[interfaceName] - self.__debuggerInterfaces = {} self.__debuggerInterfaceRegistry = {} for interfaceName, getRegistryData in registeredInterfaces.items(): - self.registerDebuggerInterface(interfaceName, getRegistryData) + self.registerDebuggerInterface(interfaceName, getRegistryData, + reregister=True) self.__maxVariableSize = Preferences.getDebugger("MaxVariableSize") - def registerDebuggerInterface(self, interfaceName, getRegistryData): + def registerDebuggerInterface(self, interfaceName, getRegistryData, + reregister=False): """ Public method to register a debugger interface. @@ -320,8 +321,10 @@ list of associated file extensions and a function reference to create the debugger interface (see __createDebuggerInterface()) @type function + @param reregister flag indicating to re-register the interface + @type bool """ - if interfaceName in self.__debuggerInterfaces: + if interfaceName in self.__debuggerInterfaces and not reregister: E5MessageBox.warning( None, self.tr("Register Debugger Interface"), @@ -329,9 +332,10 @@ """ been registered. Ignoring this request.</p>""")) return + if not reregister: + self.__debuggerInterfaces[interfaceName] = getRegistryData registryDataList = getRegistryData() if registryDataList: - self.__debuggerInterfaces[interfaceName] = getRegistryData for clientLanguage, clientCapabilities, clientExtensions, \ interfaceCreator in registryDataList: self.__debuggerInterfaceRegistry[clientLanguage] = [
--- a/Documentation/Source/eric6.Debugger.DebugServer.html Wed Jun 27 18:43:11 2018 +0200 +++ b/Documentation/Source/eric6.Debugger.DebugServer.html Wed Jun 27 18:44:54 2018 +0200 @@ -1106,7 +1106,7 @@ Public slot to handle the preferencesChanged signal. </p><a NAME="DebugServer.registerDebuggerInterface" ID="DebugServer.registerDebuggerInterface"></a> <h4>DebugServer.registerDebuggerInterface</h4> -<b>registerDebuggerInterface</b>(<i>interfaceName, getRegistryData</i>) +<b>registerDebuggerInterface</b>(<i>interfaceName, getRegistryData, reregister=False</i>) <p> Public method to register a debugger interface. </p><dl> @@ -1120,6 +1120,9 @@ return the client language, the client capabilities, the list of associated file extensions and a function reference to create the debugger interface (see __createDebuggerInterface()) +</dd><dt><i>reregister</i> (bool)</dt> +<dd> +flag indicating to re-register the interface </dd> </dl><a NAME="DebugServer.remoteBanner" ID="DebugServer.remoteBanner"></a> <h4>DebugServer.remoteBanner</h4>