eric6/Debugger/DebugServer.py

branch
multi_processing
changeset 7646
39e3db2b4936
parent 7421
4a9900aef04e
parent 7635
0cdead130a81
child 7802
eefe954f01e8
equal deleted inserted replaced
7627:812ee8c0a91a 7646:39e3db2b4936
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, pyqtSlot, QModelIndex 13 from PyQt5.QtCore import pyqtSignal, pyqtSlot, QModelIndex
15 from PyQt5.QtNetwork import ( 14 from PyQt5.QtNetwork import (
16 QTcpServer, QHostAddress, QHostInfo, QNetworkInterface 15 QTcpServer, QHostAddress, QHostInfo, QNetworkInterface
17 ) 16 )
199 self.__reportedBreakpointIssues = [] 198 self.__reportedBreakpointIssues = []
200 self.__reportedWatchpointIssues = [] 199 self.__reportedWatchpointIssues = []
201 200
202 self.networkInterface = Preferences.getDebugger("NetworkInterface") 201 self.networkInterface = Preferences.getDebugger("NetworkInterface")
203 if self.networkInterface == "all": 202 if self.networkInterface == "all":
204 hostAddress = QHostAddress("0.0.0.0") # QHostAddress.Any) 203 hostAddress = QHostAddress("0.0.0.0") # QHostAddress.Any) # secok
205 elif self.networkInterface == "allv6": 204 elif self.networkInterface == "allv6":
206 hostAddress = QHostAddress("::") # QHostAddress.AnyIPv6) 205 hostAddress = QHostAddress("::") # QHostAddress.AnyIPv6)
207 else: 206 else:
208 hostAddress = QHostAddress(self.networkInterface) 207 hostAddress = QHostAddress(self.networkInterface)
209 self.networkInterfaceName, self.networkInterfaceIndex = ( 208 self.networkInterfaceName, self.networkInterfaceIndex = (
227 self.clientProcess = None 226 self.clientProcess = None
228 self.clientInterpreter = "" 227 self.clientInterpreter = ""
229 self.clientType = Preferences.Prefs.settings.value('DebugClient/Type') 228 self.clientType = Preferences.Prefs.settings.value('DebugClient/Type')
230 if self.clientType is None: 229 if self.clientType is None:
231 self.clientType = 'Python3' 230 self.clientType = 'Python3'
232 # Change clientType if dependent interpreter does not exist anymore
233 # (maybe deinstalled,...)
234 elif self.clientType == 'Python2' and Preferences.getDebugger(
235 "Python2VirtualEnv") == '' and sys.version_info[0] >= 3:
236 self.clientType = 'Python3'
237 elif self.clientType == 'Python3' and Preferences.getDebugger(
238 "Python3VirtualEnv") == '' and sys.version_info[0] == 2:
239 self.clientType = 'Python2'
240 231
241 self.lastClientType = '' 232 self.lastClientType = ''
242 self.__autoClearShell = False 233 self.__autoClearShell = False
243 self.__forProject = False 234 self.__forProject = False
244 235

eric ide

mercurial