209 @param workingDir directory to start the debugger client in (defaults to "") |
209 @param workingDir directory to start the debugger client in (defaults to "") |
210 @type str (optional) |
210 @type str (optional) |
211 @param configOverride dictionary containing the global config override data |
211 @param configOverride dictionary containing the global config override data |
212 (defaults to None) |
212 (defaults to None) |
213 @type dict (optional) |
213 @type dict (optional) |
214 @param startRemote flag indicating to start the client via an eric-ide server |
214 @param startViaServer flag indicating to start the client via an eric-ide server |
215 (defaults to None) |
215 (defaults to None) |
216 @type bool (optional) |
216 @type bool (optional) |
217 @return client process object, a flag to indicate a network connection |
217 @return client process object, a flag to indicate a network connection |
218 and the name of the interpreter in case of a local execution |
218 and the name of the interpreter in case of a local execution |
219 @rtype tuple of (QProcess, bool, str) |
219 @rtype tuple of (QProcess, bool, str) |
220 """ |
220 """ |
221 global origPathEnv |
221 global origPathEnv |
222 |
222 |
223 if ( |
223 if ( |
224 startRemote is True |
224 startViaServer is True |
225 or ( |
225 or ( |
226 startRemote is None |
226 startViaServer is None |
227 and ( |
227 and ( |
228 venvName == self.debugServer.getEricServerEnvironmentString() |
228 venvName == self.debugServer.getEricServerEnvironmentString() |
229 or self.__ericServerDebugging |
229 or self.__ericServerDebugging |
230 ) |
230 ) |
231 ) |
231 ) |
232 ) and ericApp().getObject("EricServer").isServerConnected(): |
232 ) and ericApp().getObject("EricServer").isServerConnected(): |
233 startRemote = True |
233 startViaServer = True |
234 if venvName: |
234 if venvName: |
235 venvManager = ericApp().getObject("VirtualEnvManager") |
235 venvManager = ericApp().getObject("VirtualEnvManager") |
236 interpreter = venvManager.getVirtualenvInterpreter(venvName) |
236 interpreter = venvManager.getVirtualenvInterpreter(venvName) |
237 else: |
237 else: |
238 venvName = self.debugServer.getEricServerEnvironmentString() |
238 venvName = self.debugServer.getEricServerEnvironmentString() |
279 "--call-trace-optimization" |
279 "--call-trace-optimization" |
280 if Preferences.getDebugger("PythonCallTraceOptimization") |
280 if Preferences.getDebugger("PythonCallTraceOptimization") |
281 else "" |
281 else "" |
282 ) |
282 ) |
283 |
283 |
284 if Preferences.getDebugger("RemoteDbgEnabled"): |
284 if Preferences.getDebugger("RemoteDbgEnabled") and not startViaServer: |
285 # remote debugging code |
285 # remote debugging code |
286 ipaddr = self.debugServer.getHostAddress(False) |
286 ipaddr = self.debugServer.getHostAddress(False) |
287 rexec = Preferences.getDebugger("RemoteExecution") |
287 rexec = Preferences.getDebugger("RemoteExecution") |
288 rhost = Preferences.getDebugger("RemoteHost") |
288 rhost = Preferences.getDebugger("RemoteHost") |
289 if rhost == "": |
289 if rhost == "": |
348 " login was given.</p>" |
348 " login was given.</p>" |
349 ), |
349 ), |
350 ) |
350 ) |
351 return None, False, "" |
351 return None, False, "" |
352 |
352 |
353 elif startRemote and self.__ericServerDebuggerInterface is not None: |
353 elif startViaServer and self.__ericServerDebuggerInterface is not None: |
354 # debugging via an eric-ide server |
354 # debugging via an eric-ide server |
355 self.translate = self.__ericServerTranslation |
355 self.translate = self.__ericServerTranslation |
356 self.__ericServerDebugging = True |
356 self.__ericServerDebugging = True |
357 |
357 |
358 args = [] |
358 args = [] |
497 @param workingDir directory to start the debugger client in |
497 @param workingDir directory to start the debugger client in |
498 @type str |
498 @type str |
499 @param configOverride dictionary containing the global config override |
499 @param configOverride dictionary containing the global config override |
500 data |
500 data |
501 @type dict |
501 @type dict |
502 @param startRemote flag indicating to start the client via an eric-ide server |
502 @param startViaServer flag indicating to start the client via an eric-ide server |
503 (defaults to False) |
503 (defaults to None) |
504 @type bool (optional) |
504 @type bool (optional) |
505 @return client process object, a flag to indicate a network connection |
505 @return client process object, a flag to indicate a network connection |
506 and the name of the interpreter in case of a local execution |
506 and the name of the interpreter in case of a local execution |
507 @rtype tuple of (QProcess, bool, str) |
507 @rtype tuple of (QProcess, bool, str) |
508 """ |
508 """ |
527 if Preferences.getDebugger("PythonCallTraceOptimization") |
527 if Preferences.getDebugger("PythonCallTraceOptimization") |
528 else "" |
528 else "" |
529 ) |
529 ) |
530 |
530 |
531 if ( |
531 if ( |
532 startRemote is True |
532 startViaServer is True |
533 or ( |
533 or ( |
534 startRemote is None |
534 startViaServer is None |
535 and ( |
535 and ( |
536 venvName == self.debugServer.getEricServerEnvironmentString() |
536 venvName == self.debugServer.getEricServerEnvironmentString() |
537 or self.__ericServerDebugging |
537 or self.__ericServerDebugging |
538 ) |
538 ) |
539 ) |
539 ) |
540 ) and ericApp().getObject("EricServer").isServerConnected(): |
540 ) and ericApp().getObject("EricServer").isServerConnected(): |
541 startRemote = True |
541 startViaServer = True |
542 if venvName and venvName != self.debugServer.getProjectEnvironmentString(): |
542 if venvName and venvName != self.debugServer.getProjectEnvironmentString(): |
543 venvManager = ericApp().getObject("VirtualEnvManager") |
543 venvManager = ericApp().getObject("VirtualEnvManager") |
544 interpreter = venvManager.getVirtualenvInterpreter(venvName) |
544 interpreter = venvManager.getVirtualenvInterpreter(venvName) |
545 else: |
545 else: |
546 venvName = project.getProjectVenv() |
546 venvName = project.getProjectVenv() |
567 |
567 |
568 self.__inShutdown = False |
568 self.__inShutdown = False |
569 |
569 |
570 self.__ericServerDebugging = False |
570 self.__ericServerDebugging = False |
571 |
571 |
572 if project.getDebugProperty("REMOTEDEBUGGER"): |
572 if project.getDebugProperty("REMOTEDEBUGGER") and not startViaServer: |
573 # remote debugging code |
573 # remote debugging code |
574 ipaddr = self.debugServer.getHostAddress(False) |
574 ipaddr = self.debugServer.getHostAddress(False) |
575 rexec = project.getDebugProperty("REMOTECOMMAND") |
575 rexec = project.getDebugProperty("REMOTECOMMAND") |
576 rhost = project.getDebugProperty("REMOTEHOST") |
576 rhost = project.getDebugProperty("REMOTEHOST") |
577 if rhost == "": |
577 if rhost == "": |
627 return process, self.__isNetworked, "" |
627 return process, self.__isNetworked, "" |
628 else: |
628 else: |
629 # remote shell command is missing |
629 # remote shell command is missing |
630 return None, self.__isNetworked, "" |
630 return None, self.__isNetworked, "" |
631 |
631 |
632 elif startRemote and self.__ericServerDebuggerInterface is not None: |
632 elif startViaServer and self.__ericServerDebuggerInterface is not None: |
633 # debugging via an eric-ide server |
633 # debugging via an eric-ide server |
634 self.translate = self.__ericServerTranslation |
634 self.translate = self.__ericServerTranslation |
635 self.__ericServerDebugging = True |
635 self.__ericServerDebugging = True |
636 |
636 |
637 args = [] |
637 args = [] |