916 peerAddress = sock.peerAddress().toString() |
916 peerAddress = sock.peerAddress().toString() |
917 if peerAddress not in Preferences.getDebugger("AllowedHosts"): |
917 if peerAddress not in Preferences.getDebugger("AllowedHosts"): |
918 # the peer is not allowed to connect |
918 # the peer is not allowed to connect |
919 res = EricMessageBox.yesNo( |
919 res = EricMessageBox.yesNo( |
920 None, |
920 None, |
921 self.tr("Connection from illegal host"), |
921 self.tr("Connection from unknown host"), |
922 self.tr( |
922 self.tr( |
923 """<p>A connection was attempted by the illegal host""" |
923 """<p>A connection was attempted by the unknown host""" |
924 """ <b>{0}</b>. Accept this connection?</p>""" |
924 """ <b>{0}</b>. Accept this connection?</p>""" |
925 ).format(peerAddress), |
925 ).format(peerAddress), |
926 icon=EricMessageBox.Warning, |
926 icon=EricMessageBox.Warning, |
927 ) |
927 ) |
928 if not res: |
928 if not res: |
1000 clientType="", |
1000 clientType="", |
1001 enableCallTrace=False, |
1001 enableCallTrace=False, |
1002 enableMultiprocess=False, |
1002 enableMultiprocess=False, |
1003 multiprocessNoDebug="", |
1003 multiprocessNoDebug="", |
1004 configOverride=None, |
1004 configOverride=None, |
|
1005 reportAllExceptions=False, |
1005 ): |
1006 ): |
1006 """ |
1007 """ |
1007 Public method to load a new program to debug. |
1008 Public method to load a new program to debug. |
1008 |
1009 |
1009 @param venvName name of the virtual environment to be used |
1010 @param venvName name of the virtual environment to be used |
1042 debugged |
1043 debugged |
1043 @type str |
1044 @type str |
1044 @param configOverride dictionary containing the global config override |
1045 @param configOverride dictionary containing the global config override |
1045 data |
1046 data |
1046 @type dict |
1047 @type dict |
|
1048 @param reportAllExceptions flag indicating to report all exceptions |
|
1049 instead of unhandled exceptions only |
|
1050 @type bool |
1047 """ |
1051 """ |
1048 self.__autoClearShell = autoClearShell |
1052 self.__autoClearShell = autoClearShell |
1049 self.__multiprocessNoDebugList = [ |
1053 self.__multiprocessNoDebugList = [ |
1050 s.strip() for s in multiprocessNoDebug.split(os.pathsep) |
1054 s.strip() for s in multiprocessNoDebug.split(os.pathsep) |
1051 ] |
1055 ] |
1088 argv, |
1092 argv, |
1089 wd, |
1093 wd, |
1090 tracePython, |
1094 tracePython, |
1091 autoContinue, |
1095 autoContinue, |
1092 enableMultiprocess=enableMultiprocess, |
1096 enableMultiprocess=enableMultiprocess, |
|
1097 reportAllExceptions=reportAllExceptions, |
1093 ) |
1098 ) |
1094 self.debugging = True |
1099 self.debugging = True |
1095 self.running = True |
1100 self.running = True |
1096 self.__restoreBreakpoints() |
1101 self.__restoreBreakpoints() |
1097 self.__restoreWatchpoints() |
1102 self.__restoreWatchpoints() |
2047 toLine, |
2052 toLine, |
2048 toFunction, |
2053 toFunction, |
2049 debuggerId, |
2054 debuggerId, |
2050 ) |
2055 ) |
2051 |
2056 |
2052 def passiveStartUp(self, fn, exc, debuggerId): |
2057 def passiveStartUp(self, fn, reportAllExceptions, debuggerId): |
2053 """ |
2058 """ |
2054 Public method to handle a passive debug connection. |
2059 Public method to handle a passive debug connection. |
2055 |
2060 |
2056 @param fn filename of the debugged script |
2061 @param fn filename of the debugged script |
2057 @type str |
2062 @type str |
2058 @param exc flag to enable exception reporting of the IDE |
2063 @param reportAllExceptions flag to enable reporting of all exceptions |
2059 @type bool |
2064 @type bool |
2060 @param debuggerId ID of the debugger backend |
2065 @param debuggerId ID of the debugger backend |
2061 @type str |
2066 @type str |
2062 """ |
2067 """ |
2063 self.appendStdout.emit(self.tr("Passive debug connection received\n")) |
2068 self.appendStdout.emit(self.tr("Passive debug connection received\n")) |
2064 self.passiveClientExited = False |
2069 self.passiveClientExited = False |
2065 self.debugging = True |
2070 self.debugging = True |
2066 self.running = True |
2071 self.running = True |
2067 self.__restoreBreakpoints(debuggerId) |
2072 self.__restoreBreakpoints(debuggerId) |
2068 self.__restoreWatchpoints(debuggerId) |
2073 self.__restoreWatchpoints(debuggerId) |
2069 self.passiveDebugStarted.emit(fn, exc) |
2074 self.passiveDebugStarted.emit(fn, reportAllExceptions) |
2070 |
2075 |
2071 def __passiveShutDown(self): |
2076 def __passiveShutDown(self): |
2072 """ |
2077 """ |
2073 Private method to shut down a passive debug connection. |
2078 Private method to shut down a passive debug connection. |
2074 """ |
2079 """ |