Tue, 22 Nov 2022 14:02:00 +0100
Added some TODOs to the debugger configuration page to extend the possible interfaces to listen on.
src/eric7/Debugger/DebugServer.py | file | annotate | diff | comparison | revisions | |
src/eric7/Preferences/ConfigurationPages/DebuggerGeneralPage.py | file | annotate | diff | comparison | revisions |
--- a/src/eric7/Debugger/DebugServer.py Tue Nov 22 13:45:36 2022 +0100 +++ b/src/eric7/Debugger/DebugServer.py Tue Nov 22 14:02:00 2022 +0100 @@ -192,7 +192,7 @@ self.networkInterface = Preferences.getDebugger("NetworkInterface") if self.networkInterface == "all": hostAddress = QHostAddress("0.0.0.0") - # QHostAddress.SpecialAddress.Any) # secok + # QHostAddress.SpecialAddress.AnyIPv4) # secok elif self.networkInterface == "allv6": hostAddress = QHostAddress("::") # QHostAddress.SpecialAddress.AnyIPv6)
--- a/src/eric7/Preferences/ConfigurationPages/DebuggerGeneralPage.py Tue Nov 22 13:45:36 2022 +0100 +++ b/src/eric7/Preferences/ConfigurationPages/DebuggerGeneralPage.py Tue Nov 22 14:02:00 2022 +0100 @@ -8,7 +8,6 @@ """ import re -import socket from PyQt6.QtCore import QAbstractItemModel, QModelIndex, Qt, pyqtSlot from PyQt6.QtGui import QBrush, QColor @@ -66,8 +65,6 @@ addressEntries = networkInterface.addressEntries() if len(addressEntries) > 0: for addressEntry in addressEntries: - if ":" in addressEntry.ip().toString() and not socket.has_ipv6: - continue # IPv6 not supported by Python interfaces.append( "{0} ({1})".format( networkInterface.humanReadableName(), @@ -76,11 +73,16 @@ ) self.interfacesCombo.addItems(interfaces) interface = Preferences.getDebugger("NetworkInterface") - if not socket.has_ipv6: - # IPv6 not supported by Python - self.all6InterfacesButton.setEnabled(False) - if interface == "allv6": - interface = "all" + # TODO: change config 'all' to 'allv4' + # TODO: change radiobutton selection to combo box and include + # - Localhost (IPv4) (localv4) + # - LocalHost (IPv6) (localv6) + # - Any (IPv4) (allv4) + # - Any (IPv6) (allv6) + # - Any (IPv4 and IPv6) (all) + # - Selected Interface + # TODO: allow to listen on a specific port with auto-increment if port is in + # use already if interface == "all": self.allInterfacesButton.setChecked(True) elif interface == "allv6":