Debugger/DebuggerInterfacePython3.py

branch
Py2 comp.
changeset 3058
0a02c433f52d
parent 3057
10516539f238
parent 3021
801289962f4e
child 3060
5883ce99ee12
equal deleted inserted replaced
3057:10516539f238 3058:0a02c433f52d
191 [rhost, interpreter, os.path.abspath(debugClient), 191 [rhost, interpreter, os.path.abspath(debugClient),
192 noencoding, str(port), redirect, ipaddr] 192 noencoding, str(port), redirect, ipaddr]
193 args[0] = Utilities.getExecutablePath(args[0]) 193 args[0] = Utilities.getExecutablePath(args[0])
194 process = self.__startProcess(args[0], args[1:]) 194 process = self.__startProcess(args[0], args[1:])
195 if process is None: 195 if process is None:
196 E5MessageBox.critical(None, 196 E5MessageBox.critical(
197 None,
197 self.trUtf8("Start Debugger"), 198 self.trUtf8("Start Debugger"),
198 self.trUtf8( 199 self.trUtf8(
199 """<p>The debugger backend could not be""" 200 """<p>The debugger backend could not be"""
200 """ started.</p>""")) 201 """ started.</p>"""))
201 202
237 [interpreter, os.path.abspath(debugClient), 238 [interpreter, os.path.abspath(debugClient),
238 noencoding, str(port), '0', ipaddr] 239 noencoding, str(port), '0', ipaddr]
239 args[0] = Utilities.getExecutablePath(args[0]) 240 args[0] = Utilities.getExecutablePath(args[0])
240 process = self.__startProcess(args[0], args[1:], clientEnv) 241 process = self.__startProcess(args[0], args[1:], clientEnv)
241 if process is None: 242 if process is None:
242 E5MessageBox.critical(None, 243 E5MessageBox.critical(
244 None,
243 self.trUtf8("Start Debugger"), 245 self.trUtf8("Start Debugger"),
244 self.trUtf8( 246 self.trUtf8(
245 """<p>The debugger backend could not be""" 247 """<p>The debugger backend could not be"""
246 """ started.</p>""")) 248 """ started.</p>"""))
247 return process, self.__isNetworked 249 return process, self.__isNetworked
248 250
249 process = self.__startProcess(interpreter, 251 process = self.__startProcess(
252 interpreter,
250 [debugClient, noencoding, str(port), redirect, ipaddr], 253 [debugClient, noencoding, str(port), redirect, ipaddr],
251 clientEnv) 254 clientEnv)
252 if process is None: 255 if process is None:
253 E5MessageBox.critical(None, 256 E5MessageBox.critical(
257 None,
254 self.trUtf8("Start Debugger"), 258 self.trUtf8("Start Debugger"),
255 self.trUtf8( 259 self.trUtf8(
256 """<p>The debugger backend could not be started.</p>""")) 260 """<p>The debugger backend could not be started.</p>"""))
257 return process, self.__isNetworked 261 return process, self.__isNetworked
258 262
289 [rhost, interpreter, os.path.abspath(debugClient), 293 [rhost, interpreter, os.path.abspath(debugClient),
290 noencoding, str(port), redirect, ipaddr] 294 noencoding, str(port), redirect, ipaddr]
291 args[0] = Utilities.getExecutablePath(args[0]) 295 args[0] = Utilities.getExecutablePath(args[0])
292 process = self.__startProcess(args[0], args[1:]) 296 process = self.__startProcess(args[0], args[1:])
293 if process is None: 297 if process is None:
294 E5MessageBox.critical(None, 298 E5MessageBox.critical(
299 None,
295 self.trUtf8("Start Debugger"), 300 self.trUtf8("Start Debugger"),
296 self.trUtf8( 301 self.trUtf8(
297 """<p>The debugger backend could not be""" 302 """<p>The debugger backend could not be"""
298 """ started.</p>""")) 303 """ started.</p>"""))
299 # set translation function 304 # set translation function
335 [interpreter, os.path.abspath(debugClient), 340 [interpreter, os.path.abspath(debugClient),
336 noencoding, str(port), '0', ipaddr] 341 noencoding, str(port), '0', ipaddr]
337 args[0] = Utilities.getExecutablePath(args[0]) 342 args[0] = Utilities.getExecutablePath(args[0])
338 process = self.__startProcess(args[0], args[1:], clientEnv) 343 process = self.__startProcess(args[0], args[1:], clientEnv)
339 if process is None: 344 if process is None:
340 E5MessageBox.critical(None, 345 E5MessageBox.critical(
346 None,
341 self.trUtf8("Start Debugger"), 347 self.trUtf8("Start Debugger"),
342 self.trUtf8( 348 self.trUtf8(
343 """<p>The debugger backend could not be""" 349 """<p>The debugger backend could not be"""
344 """ started.</p>""")) 350 """ started.</p>"""))
345 return process, self.__isNetworked 351 return process, self.__isNetworked
346 352
347 process = self.__startProcess(interpreter, 353 process = self.__startProcess(
354 interpreter,
348 [debugClient, noencoding, str(port), redirect, ipaddr], 355 [debugClient, noencoding, str(port), redirect, ipaddr],
349 clientEnv) 356 clientEnv)
350 if process is None: 357 if process is None:
351 E5MessageBox.critical(None, 358 E5MessageBox.critical(
359 None,
352 self.trUtf8("Start Debugger"), 360 self.trUtf8("Start Debugger"),
353 self.trUtf8( 361 self.trUtf8(
354 """<p>The debugger backend could not be started.</p>""")) 362 """<p>The debugger backend could not be started.</p>"""))
355 return process, self.__isNetworked 363 return process, self.__isNetworked
356 364
853 if resp == DebugProtocol.CallTrace: 861 if resp == DebugProtocol.CallTrace:
854 event, fromStr, toStr = line[eoc:-1].split("@@") 862 event, fromStr, toStr = line[eoc:-1].split("@@")
855 isCall = event.lower() == "c" 863 isCall = event.lower() == "c"
856 fromFile, fromLineno, fromFunc = fromStr.rsplit(":", 2) 864 fromFile, fromLineno, fromFunc = fromStr.rsplit(":", 2)
857 toFile, toLineno, toFunc = toStr.rsplit(":", 2) 865 toFile, toLineno, toFunc = toStr.rsplit(":", 2)
858 self.debugServer.signalClientCallTrace(isCall, 866 self.debugServer.signalClientCallTrace(
867 isCall,
859 fromFile, fromLineno, fromFunc, 868 fromFile, fromLineno, fromFunc,
860 toFile, toLineno, toFunc) 869 toFile, toLineno, toFunc)
861 continue 870 continue
862 871
863 if resp == DebugProtocol.ResponseThreadList: 872 if resp == DebugProtocol.ResponseThreadList:

eric ide

mercurial