eric6/Debugger/DebugServer.py

branch
maintenance
changeset 7642
72721823d453
parent 7362
028bf21bb5a2
parent 7635
0cdead130a81
child 7737
5371a22cf2aa
equal deleted inserted replaced
7608:f7cb83647621 7642:72721823d453
7 Module implementing the debug server. 7 Module implementing the debug server.
8 """ 8 """
9 9
10 10
11 import os 11 import os
12 import sys
13 12
14 from PyQt5.QtCore import pyqtSignal, QModelIndex 13 from PyQt5.QtCore import pyqtSignal, QModelIndex
15 from PyQt5.QtNetwork import ( 14 from PyQt5.QtNetwork import (
16 QTcpServer, QHostAddress, QHostInfo, QNetworkInterface 15 QTcpServer, QHostAddress, QHostInfo, QNetworkInterface
17 ) 16 )
186 self.watchSpecialChanged = self.tr( 185 self.watchSpecialChanged = self.tr(
187 "changed", "must be same as in EditWatchpointDialog") 186 "changed", "must be same as in EditWatchpointDialog")
188 187
189 self.networkInterface = Preferences.getDebugger("NetworkInterface") 188 self.networkInterface = Preferences.getDebugger("NetworkInterface")
190 if self.networkInterface == "all": 189 if self.networkInterface == "all":
191 hostAddress = QHostAddress("0.0.0.0") # QHostAddress.Any) 190 hostAddress = QHostAddress("0.0.0.0") # QHostAddress.Any) # secok
192 elif self.networkInterface == "allv6": 191 elif self.networkInterface == "allv6":
193 hostAddress = QHostAddress("::") # QHostAddress.AnyIPv6) 192 hostAddress = QHostAddress("::") # QHostAddress.AnyIPv6)
194 else: 193 else:
195 hostAddress = QHostAddress(self.networkInterface) 194 hostAddress = QHostAddress(self.networkInterface)
196 self.networkInterfaceName, self.networkInterfaceIndex = ( 195 self.networkInterfaceName, self.networkInterfaceIndex = (
214 self.clientProcess = None 213 self.clientProcess = None
215 self.clientInterpreter = "" 214 self.clientInterpreter = ""
216 self.clientType = Preferences.Prefs.settings.value('DebugClient/Type') 215 self.clientType = Preferences.Prefs.settings.value('DebugClient/Type')
217 if self.clientType is None: 216 if self.clientType is None:
218 self.clientType = 'Python3' 217 self.clientType = 'Python3'
219 # Change clientType if dependent interpreter does not exist anymore
220 # (maybe deinstalled,...)
221 elif self.clientType == 'Python2' and Preferences.getDebugger(
222 "Python2VirtualEnv") == '' and sys.version_info[0] >= 3:
223 self.clientType = 'Python3'
224 elif self.clientType == 'Python3' and Preferences.getDebugger(
225 "Python3VirtualEnv") == '' and sys.version_info[0] == 2:
226 self.clientType = 'Python2'
227 218
228 self.lastClientType = '' 219 self.lastClientType = ''
229 self.__autoClearShell = False 220 self.__autoClearShell = False
230 self.__forProject = False 221 self.__forProject = False
231 222

eric ide

mercurial