Debugger/DebugServer.py

changeset 3190
a9a94491c4fd
parent 3160
209a07d7e401
child 3345
071afe8be2a1
equal deleted inserted replaced
3189:9a21c547de5f 3190:a9a94491c4fd
148 148
149 # create our models 149 # create our models
150 self.breakpointModel = BreakPointModel(self) 150 self.breakpointModel = BreakPointModel(self)
151 self.watchpointModel = WatchPointModel(self) 151 self.watchpointModel = WatchPointModel(self)
152 self.watchSpecialCreated = \ 152 self.watchSpecialCreated = \
153 self.trUtf8("created", "must be same as in EditWatchpointDialog") 153 self.tr("created", "must be same as in EditWatchpointDialog")
154 self.watchSpecialChanged = \ 154 self.watchSpecialChanged = \
155 self.trUtf8("changed", "must be same as in EditWatchpointDialog") 155 self.tr("changed", "must be same as in EditWatchpointDialog")
156 156
157 self.networkInterface = Preferences.getDebugger("NetworkInterface") 157 self.networkInterface = Preferences.getDebugger("NetworkInterface")
158 if self.networkInterface == "all": 158 if self.networkInterface == "all":
159 hostAddress = QHostAddress("0.0.0.0") # QHostAddress.Any) 159 hostAddress = QHostAddress("0.0.0.0") # QHostAddress.Any)
160 elif self.networkInterface == "allv6": 160 elif self.networkInterface == "allv6":
632 peerAddress = sock.peerAddress().toString() 632 peerAddress = sock.peerAddress().toString()
633 if peerAddress not in Preferences.getDebugger("AllowedHosts"): 633 if peerAddress not in Preferences.getDebugger("AllowedHosts"):
634 # the peer is not allowed to connect 634 # the peer is not allowed to connect
635 res = E5MessageBox.yesNo( 635 res = E5MessageBox.yesNo(
636 None, 636 None,
637 self.trUtf8("Connection from illegal host"), 637 self.tr("Connection from illegal host"),
638 self.trUtf8( 638 self.tr(
639 """<p>A connection was attempted by the illegal host""" 639 """<p>A connection was attempted by the illegal host"""
640 """ <b>{0}</b>. Accept this connection?</p>""") 640 """ <b>{0}</b>. Accept this connection?</p>""")
641 .format(peerAddress), 641 .format(peerAddress),
642 icon=E5MessageBox.Warning) 642 icon=E5MessageBox.Warning)
643 if not res: 643 if not res:
1232 self.clientExit.emit(int(status)) 1232 self.clientExit.emit(int(status))
1233 if Preferences.getDebugger("AutomaticReset"): 1233 if Preferences.getDebugger("AutomaticReset"):
1234 self.startClient(False) 1234 self.startClient(False)
1235 if self.passive: 1235 if self.passive:
1236 self.__createDebuggerInterface("None") 1236 self.__createDebuggerInterface("None")
1237 self.signalClientOutput(self.trUtf8('\nNot connected\n')) 1237 self.signalClientOutput(self.tr('\nNot connected\n'))
1238 self.signalClientStatement(False) 1238 self.signalClientStatement(False)
1239 self.running = False 1239 self.running = False
1240 1240
1241 def signalClientClearBreak(self, filename, lineno): 1241 def signalClientClearBreak(self, filename, lineno):
1242 """ 1242 """
1412 Public method to handle a passive debug connection. 1412 Public method to handle a passive debug connection.
1413 1413
1414 @param fn filename of the debugged script (string) 1414 @param fn filename of the debugged script (string)
1415 @param exc flag to enable exception reporting of the IDE (boolean) 1415 @param exc flag to enable exception reporting of the IDE (boolean)
1416 """ 1416 """
1417 print(self.trUtf8("Passive debug connection received")) 1417 print(self.tr("Passive debug connection received"))
1418 self.passiveClientExited = False 1418 self.passiveClientExited = False
1419 self.debugging = True 1419 self.debugging = True
1420 self.running = True 1420 self.running = True
1421 self.__restoreBreakpoints() 1421 self.__restoreBreakpoints()
1422 self.__restoreWatchpoints() 1422 self.__restoreWatchpoints()
1426 """ 1426 """
1427 Private method to shut down a passive debug connection. 1427 Private method to shut down a passive debug connection.
1428 """ 1428 """
1429 self.passiveClientExited = True 1429 self.passiveClientExited = True
1430 self.shutdownServer() 1430 self.shutdownServer()
1431 print(self.trUtf8("Passive debug connection closed")) 1431 print(self.tr("Passive debug connection closed"))
1432 1432
1433 def __restoreBreakpoints(self): 1433 def __restoreBreakpoints(self):
1434 """ 1434 """
1435 Private method to restore the breakpoints after a restart. 1435 Private method to restore the breakpoints after a restart.
1436 """ 1436 """

eric ide

mercurial