213 Preferences.getDebugger("Python3NoEncoding") and "--no-encoding" or "" |
213 Preferences.getDebugger("Python3NoEncoding") and "--no-encoding" or "" |
214 ) |
214 ) |
215 multiprocessEnabled = ( |
215 multiprocessEnabled = ( |
216 "--multiprocess" if Preferences.getDebugger("MultiProcessEnabled") else "" |
216 "--multiprocess" if Preferences.getDebugger("MultiProcessEnabled") else "" |
217 ) |
217 ) |
|
218 callTraceOptimization = ( |
|
219 "--call-trace-optimization" |
|
220 if Preferences.getDebugger("PythonCallTraceOptimization") |
|
221 else "" |
|
222 ) |
218 |
223 |
219 if Preferences.getDebugger("RemoteDbgEnabled"): |
224 if Preferences.getDebugger("RemoteDbgEnabled"): |
220 ipaddr = self.debugServer.getHostAddress(False) |
225 ipaddr = self.debugServer.getHostAddress(False) |
221 rexec = Preferences.getDebugger("RemoteExecution") |
226 rexec = Preferences.getDebugger("RemoteExecution") |
222 rhost = Preferences.getDebugger("RemoteHost") |
227 rhost = Preferences.getDebugger("RemoteHost") |
230 ] |
235 ] |
231 if noencoding: |
236 if noencoding: |
232 args.append(noencoding) |
237 args.append(noencoding) |
233 if multiprocessEnabled: |
238 if multiprocessEnabled: |
234 args.append(multiprocessEnabled) |
239 args.append(multiprocessEnabled) |
|
240 if callTraceOptimization: |
|
241 args.append(callTraceOptimization) |
235 args.extend([str(port), redirect, ipaddr]) |
242 args.extend([str(port), redirect, ipaddr]) |
236 if OSUtilities.isWindowsPlatform(): |
243 if OSUtilities.isWindowsPlatform(): |
237 if not os.path.splitext(args[0])[1]: |
244 if not os.path.splitext(args[0])[1]: |
238 for ext in [".exe", ".com", ".cmd", ".bat"]: |
245 for ext in [".exe", ".com", ".cmd", ".bat"]: |
239 prog = FileSystemUtilities.getExecutablePath(args[0] + ext) |
246 prog = FileSystemUtilities.getExecutablePath(args[0] + ext) |
299 ] |
306 ] |
300 if noencoding: |
307 if noencoding: |
301 args.append(noencoding) |
308 args.append(noencoding) |
302 if multiprocessEnabled: |
309 if multiprocessEnabled: |
303 args.append(multiprocessEnabled) |
310 args.append(multiprocessEnabled) |
|
311 if callTraceOptimization: |
|
312 args.append(callTraceOptimization) |
304 args.extend([str(port), "0", ipaddr]) |
313 args.extend([str(port), "0", ipaddr]) |
305 args[0] = FileSystemUtilities.getExecutablePath(args[0]) |
314 args[0] = FileSystemUtilities.getExecutablePath(args[0]) |
306 process = self.__startProcess( |
315 process = self.__startProcess( |
307 args[0], args[1:], clientEnv, workingDir=workingDir |
316 args[0], args[1:], clientEnv, workingDir=workingDir |
308 ) |
317 ) |
320 args = [debugClient] |
329 args = [debugClient] |
321 if noencoding: |
330 if noencoding: |
322 args.append(noencoding) |
331 args.append(noencoding) |
323 if multiprocessEnabled: |
332 if multiprocessEnabled: |
324 args.append(multiprocessEnabled) |
333 args.append(multiprocessEnabled) |
|
334 if callTraceOptimization: |
|
335 args.append(callTraceOptimization) |
325 args.extend([str(port), redirect, ipaddr]) |
336 args.extend([str(port), redirect, ipaddr]) |
326 process = self.__startProcess( |
337 process = self.__startProcess( |
327 interpreter, args, clientEnv, workingDir=workingDir |
338 interpreter, args, clientEnv, workingDir=workingDir |
328 ) |
339 ) |
329 if process is None: |
340 if process is None: |
407 else str(project.getDebugProperty("REDIRECT")) |
418 else str(project.getDebugProperty("REDIRECT")) |
408 ) |
419 ) |
409 noencoding = "--no-encoding" if project.getDebugProperty("NOENCODING") else "" |
420 noencoding = "--no-encoding" if project.getDebugProperty("NOENCODING") else "" |
410 multiprocessEnabled = ( |
421 multiprocessEnabled = ( |
411 "--multiprocess" if Preferences.getDebugger("MultiProcessEnabled") else "" |
422 "--multiprocess" if Preferences.getDebugger("MultiProcessEnabled") else "" |
|
423 ) |
|
424 callTraceOptimization = ( |
|
425 "--call-trace-optimization" |
|
426 if Preferences.getDebugger("PythonCallTraceOptimization") |
|
427 else "" |
412 ) |
428 ) |
413 |
429 |
414 if venvName and venvName != self.debugServer.getProjectEnvironmentString(): |
430 if venvName and venvName != self.debugServer.getProjectEnvironmentString(): |
415 venvManager = ericApp().getObject("VirtualEnvManager") |
431 venvManager = ericApp().getObject("VirtualEnvManager") |
416 interpreter = venvManager.getVirtualenvInterpreter(venvName) |
432 interpreter = venvManager.getVirtualenvInterpreter(venvName) |
443 ] |
459 ] |
444 if noencoding: |
460 if noencoding: |
445 args.append(noencoding) |
461 args.append(noencoding) |
446 if multiprocessEnabled: |
462 if multiprocessEnabled: |
447 args.append(multiprocessEnabled) |
463 args.append(multiprocessEnabled) |
|
464 if callTraceOptimization: |
|
465 args.append(callTraceOptimization) |
448 args.extend([str(port), redirect, ipaddr]) |
466 args.extend([str(port), redirect, ipaddr]) |
449 if OSUtilities.isWindowsPlatform(): |
467 if OSUtilities.isWindowsPlatform(): |
450 if not os.path.splitext(args[0])[1]: |
468 if not os.path.splitext(args[0])[1]: |
451 for ext in [".exe", ".com", ".cmd", ".bat"]: |
469 for ext in [".exe", ".com", ".cmd", ".bat"]: |
452 prog = FileSystemUtilities.getExecutablePath(args[0] + ext) |
470 prog = FileSystemUtilities.getExecutablePath(args[0] + ext) |
512 ] |
530 ] |
513 if noencoding: |
531 if noencoding: |
514 args.append(noencoding) |
532 args.append(noencoding) |
515 if multiprocessEnabled: |
533 if multiprocessEnabled: |
516 args.append(multiprocessEnabled) |
534 args.append(multiprocessEnabled) |
|
535 if callTraceOptimization: |
|
536 args.append(callTraceOptimization) |
517 args.extend([str(port), "0", ipaddr]) |
537 args.extend([str(port), "0", ipaddr]) |
518 args[0] = FileSystemUtilities.getExecutablePath(args[0]) |
538 args[0] = FileSystemUtilities.getExecutablePath(args[0]) |
519 process = self.__startProcess( |
539 process = self.__startProcess( |
520 args[0], args[1:], clientEnv, workingDir=workingDir |
540 args[0], args[1:], clientEnv, workingDir=workingDir |
521 ) |
541 ) |
533 args = [debugClient] |
553 args = [debugClient] |
534 if noencoding: |
554 if noencoding: |
535 args.append(noencoding) |
555 args.append(noencoding) |
536 if multiprocessEnabled: |
556 if multiprocessEnabled: |
537 args.append(multiprocessEnabled) |
557 args.append(multiprocessEnabled) |
|
558 if callTraceOptimization: |
|
559 args.append(callTraceOptimization) |
538 args.extend([str(port), redirect, ipaddr]) |
560 args.extend([str(port), redirect, ipaddr]) |
539 process = self.__startProcess( |
561 process = self.__startProcess( |
540 interpreter, args, clientEnv, workingDir=workingDir |
562 interpreter, args, clientEnv, workingDir=workingDir |
541 ) |
563 ) |
542 if process is None: |
564 if process is None: |