82 received from the client |
82 received from the client |
83 @signal passiveDebugStarted(str, bool) emitted after the debug client has |
83 @signal passiveDebugStarted(str, bool) emitted after the debug client has |
84 connected in passive debug mode |
84 connected in passive debug mode |
85 @signal clientGone(bool) emitted if the client went away (planned or |
85 @signal clientGone(bool) emitted if the client went away (planned or |
86 unplanned) |
86 unplanned) |
|
87 @signal clientInterpreterChanged(str) emitted to signal a change of the |
|
88 client interpreter |
87 @signal utPrepared(nrTests, exc_type, exc_value) emitted after the client |
89 @signal utPrepared(nrTests, exc_type, exc_value) emitted after the client |
88 has loaded a unittest suite |
90 has loaded a unittest suite |
89 @signal utFinished() emitted after the client signalled the end of the |
91 @signal utFinished() emitted after the client signalled the end of the |
90 unittest |
92 unittest |
91 @signal utStartTest(testname, testdocu) emitted after the client has |
93 @signal utStartTest(testname, testdocu) emitted after the client has |
126 clientWatchConditionError = pyqtSignal(str) |
128 clientWatchConditionError = pyqtSignal(str) |
127 clientRawInput = pyqtSignal(str, bool) |
129 clientRawInput = pyqtSignal(str, bool) |
128 clientBanner = pyqtSignal(str, str, str) |
130 clientBanner = pyqtSignal(str, str, str) |
129 clientCapabilities = pyqtSignal(int, str) |
131 clientCapabilities = pyqtSignal(int, str) |
130 clientCompletionList = pyqtSignal(list, str) |
132 clientCompletionList = pyqtSignal(list, str) |
|
133 clientInterpreterChanged = pyqtSignal(str) |
131 utPrepared = pyqtSignal(int, str, str) |
134 utPrepared = pyqtSignal(int, str, str) |
132 utStartTest = pyqtSignal(str, str) |
135 utStartTest = pyqtSignal(str, str) |
133 utStopTest = pyqtSignal() |
136 utStopTest = pyqtSignal() |
134 utTestFailed = pyqtSignal(str, str, str) |
137 utTestFailed = pyqtSignal(str, str, str) |
135 utTestErrored = pyqtSignal(str, str, str) |
138 utTestErrored = pyqtSignal(str, str, str) |
177 |
180 |
178 self.debuggerInterface = None |
181 self.debuggerInterface = None |
179 self.debugging = False |
182 self.debugging = False |
180 self.running = False |
183 self.running = False |
181 self.clientProcess = None |
184 self.clientProcess = None |
|
185 self.clientInterpreter = "" |
182 self.clientType = \ |
186 self.clientType = \ |
183 Preferences.Prefs.settings.value('DebugClient/Type', 'Python3') |
187 Preferences.Prefs.settings.value('DebugClient/Type', 'Python3') |
184 self.lastClientType = '' |
188 self.lastClientType = '' |
185 self.__autoClearShell = False |
189 self.__autoClearShell = False |
186 |
190 |
385 |
389 |
386 self.__createDebuggerInterface() |
390 self.__createDebuggerInterface() |
387 if forProject: |
391 if forProject: |
388 project = e5App().getObject("Project") |
392 project = e5App().getObject("Project") |
389 if not project.isDebugPropertiesLoaded(): |
393 if not project.isDebugPropertiesLoaded(): |
390 self.clientProcess, isNetworked = \ |
394 self.clientProcess, isNetworked, clientInterpreter = \ |
391 self.debuggerInterface.startRemote(self.serverPort(), |
395 self.debuggerInterface.startRemote(self.serverPort(), |
392 runInConsole) |
396 runInConsole) |
393 else: |
397 else: |
394 self.clientProcess, isNetworked = \ |
398 self.clientProcess, isNetworked, clientInterpreter = \ |
395 self.debuggerInterface.startRemoteForProject( |
399 self.debuggerInterface.startRemoteForProject( |
396 self.serverPort(), runInConsole) |
400 self.serverPort(), runInConsole) |
397 else: |
401 else: |
398 self.clientProcess, isNetworked = \ |
402 self.clientProcess, isNetworked, clientInterpreter = \ |
399 self.debuggerInterface.startRemote( |
403 self.debuggerInterface.startRemote( |
400 self.serverPort(), runInConsole) |
404 self.serverPort(), runInConsole) |
401 |
405 |
402 if self.clientProcess: |
406 if self.clientProcess: |
403 self.clientProcess.readyReadStandardError.connect( |
407 self.clientProcess.readyReadStandardError.connect( |
415 else: |
419 else: |
416 if clType and self.lastClientType: |
420 if clType and self.lastClientType: |
417 self.__setClientType(self.lastClientType) |
421 self.__setClientType(self.lastClientType) |
418 else: |
422 else: |
419 self.__createDebuggerInterface("None") |
423 self.__createDebuggerInterface("None") |
|
424 clientInterpreter = "" |
|
425 |
|
426 if clientInterpreter != self.clientInterpreter: |
|
427 self.clientInterpreter = clientInterpreter |
|
428 self.clientInterpreterChanged.emit(clientInterpreter) |
420 |
429 |
421 def __clientProcessOutput(self): |
430 def __clientProcessOutput(self): |
422 """ |
431 """ |
423 Private slot to process client output received via stdout. |
432 Private slot to process client output received via stdout. |
424 """ |
433 """ |
620 """ |
629 """ |
621 try: |
630 try: |
622 return self.__clientCapabilities[type] |
631 return self.__clientCapabilities[type] |
623 except KeyError: |
632 except KeyError: |
624 return 0 # no capabilities |
633 return 0 # no capabilities |
|
634 |
|
635 def getClientInterpreter(self): |
|
636 """ |
|
637 Public method to get the interpreter of the debug client. |
|
638 |
|
639 @return interpreter of the debug client (string) |
|
640 """ |
|
641 return self.clientInterpreter |
625 |
642 |
626 def __newConnection(self): |
643 def __newConnection(self): |
627 """ |
644 """ |
628 Private slot to handle a new connection. |
645 Private slot to handle a new connection. |
629 """ |
646 """ |