eric6/Debugger/DebugServer.py

branch
multi_processing
changeset 7411
6d8dcb3551b3
parent 7409
1413bfe73d41
child 7412
0a995393d2ba
equal deleted inserted replaced
7410:401791e6f50f 7411:6d8dcb3551b3
260 self.watchpointModel.dataChanged.connect(self.__changeWatchPoints) 260 self.watchpointModel.dataChanged.connect(self.__changeWatchPoints)
261 self.watchpointModel.rowsInserted.connect(self.__addWatchPoints) 261 self.watchpointModel.rowsInserted.connect(self.__addWatchPoints)
262 262
263 self.__maxVariableSize = Preferences.getDebugger("MaxVariableSize") 263 self.__maxVariableSize = Preferences.getDebugger("MaxVariableSize")
264 264
265 self.__multiprocessNoDebugList = []
266
265 self.__registerDebuggerInterfaces() 267 self.__registerDebuggerInterfaces()
266 268
267 def getHostAddress(self, localhost): 269 def getHostAddress(self, localhost):
268 """ 270 """
269 Public method to get the IP address or hostname the debug server is 271 Public method to get the IP address or hostname the debug server is
925 927
926 def remoteLoad(self, venvName, fn, argv, wd, env, autoClearShell=True, 928 def remoteLoad(self, venvName, fn, argv, wd, env, autoClearShell=True,
927 tracePython=False, autoContinue=True, forProject=False, 929 tracePython=False, autoContinue=True, forProject=False,
928 runInConsole=False, autoFork=False, forkChild=False, 930 runInConsole=False, autoFork=False, forkChild=False,
929 clientType="", enableCallTrace=False, 931 clientType="", enableCallTrace=False,
930 enableMultiprocess=False): 932 enableMultiprocess=False, multiprocessNoDebug=""):
931 """ 933 """
932 Public method to load a new program to debug. 934 Public method to load a new program to debug.
933 935
934 @param venvName name of the virtual environment to be used 936 @param venvName name of the virtual environment to be used
935 @type str 937 @type str
965 function 967 function
966 @type bool 968 @type bool
967 @param enableMultiprocess flag indicating to perform multiprocess 969 @param enableMultiprocess flag indicating to perform multiprocess
968 debugging 970 debugging
969 @type bool 971 @type bool
972 @param multiprocessNoDebug space separated list of programs not to be
973 debugged
974 @type str
970 """ 975 """
971 self.__autoClearShell = autoClearShell 976 self.__autoClearShell = autoClearShell
977 self.__multiprocessNoDebugList = multiprocessNoDebug.split()
972 978
973 if clientType not in self.getSupportedLanguages(): 979 if clientType not in self.getSupportedLanguages():
974 # a not supported client language was requested 980 # a not supported client language was requested
975 E5MessageBox.critical( 981 E5MessageBox.critical(
976 None, 982 None,
1002 ) 1008 )
1003 self.debugging = True 1009 self.debugging = True
1004 self.running = True 1010 self.running = True
1005 self.__restoreBreakpoints() 1011 self.__restoreBreakpoints()
1006 self.__restoreWatchpoints() 1012 self.__restoreWatchpoints()
1013 self.__restoreNoDebugList()
1007 1014
1008 def remoteRun(self, venvName, fn, argv, wd, env, autoClearShell=True, 1015 def remoteRun(self, venvName, fn, argv, wd, env, autoClearShell=True,
1009 forProject=False, runInConsole=False, autoFork=False, 1016 forProject=False, runInConsole=False, autoFork=False,
1010 forkChild=False, clientType=""): 1017 forkChild=False, clientType=""):
1011 """ 1018 """
2195 @param debuggerId ID of the connected debugger 2202 @param debuggerId ID of the connected debugger
2196 @type str 2203 @type str
2197 """ 2204 """
2198 self.__restoreBreakpoints(debuggerId) 2205 self.__restoreBreakpoints(debuggerId)
2199 self.__restoreWatchpoints(debuggerId) 2206 self.__restoreWatchpoints(debuggerId)
2207 self.__restoreNoDebugList(debuggerId)
2208
2209 def __restoreNoDebugList(self, debuggerId=""):
2210 """
2211 Private method to restore the watch expressions after a restart.
2212
2213 @param debuggerId ID of the debugger backend to send to. If this is
2214 empty, they will be broadcast to all connected backends.
2215 @type str
2216 """
2217 if self.debugging:
2218 self.debuggerInterface.remoteNoDebugList(
2219 debuggerId, self.__multiprocessNoDebugList)

eric ide

mercurial