79 has decided to clear a temporary watch expression |
79 has decided to clear a temporary watch expression |
80 @signal clientWatchConditionError(condition) emitted after the client has |
80 @signal clientWatchConditionError(condition) emitted after the client has |
81 signaled a syntax error in a watch expression |
81 signaled a syntax error in a watch expression |
82 @signal clientRawInput(prompt, echo) emitted after a raw input request was |
82 @signal clientRawInput(prompt, echo) emitted after a raw input request was |
83 received |
83 received |
84 @signal clientBanner(banner) emitted after the client banner was received |
84 @signal clientBanner(version, platform, dbgclient, venvname) emitted after |
85 @signal clientCapabilities(int capabilities, string cltype) emitted after |
85 the client banner data was received |
|
86 @signal clientCapabilities(capabilities, cltype, venvname) emitted after |
86 the clients capabilities were received |
87 the clients capabilities were received |
87 @signal clientCompletionList(completionList, text) emitted after the client |
88 @signal clientCompletionList(completionList, text) emitted after the client |
88 the commandline completion list and the reworked searchstring was |
89 the commandline completion list and the reworked searchstring was |
89 received from the client |
90 received from the client |
90 @signal passiveDebugStarted(str, bool) emitted after the debug client has |
91 @signal passiveDebugStarted(str, bool) emitted after the debug client has |
135 clientSignal = pyqtSignal(str, str, int, str, str) |
136 clientSignal = pyqtSignal(str, str, int, str, str) |
136 clientExit = pyqtSignal(int, str) |
137 clientExit = pyqtSignal(int, str) |
137 clientBreakConditionError = pyqtSignal(str, int) |
138 clientBreakConditionError = pyqtSignal(str, int) |
138 clientWatchConditionError = pyqtSignal(str) |
139 clientWatchConditionError = pyqtSignal(str) |
139 clientRawInput = pyqtSignal(str, bool) |
140 clientRawInput = pyqtSignal(str, bool) |
140 clientBanner = pyqtSignal(str, str, str) |
141 clientBanner = pyqtSignal(str, str, str, str) |
141 clientCapabilities = pyqtSignal(int, str) |
142 clientCapabilities = pyqtSignal(int, str, str) |
142 clientCompletionList = pyqtSignal(list, str) |
143 clientCompletionList = pyqtSignal(list, str) |
143 clientInterpreterChanged = pyqtSignal(str) |
144 clientInterpreterChanged = pyqtSignal(str) |
144 utPrepared = pyqtSignal(int, str, str) |
145 utPrepared = pyqtSignal(int, str, str) |
145 utStartTest = pyqtSignal(str, str) |
146 utStartTest = pyqtSignal(str, str) |
146 utStopTest = pyqtSignal() |
147 utStopTest = pyqtSignal() |
152 utFinished = pyqtSignal() |
153 utFinished = pyqtSignal() |
153 passiveDebugStarted = pyqtSignal(str, bool) |
154 passiveDebugStarted = pyqtSignal(str, bool) |
154 callTraceInfo = pyqtSignal(bool, str, str, str, str, str, str) |
155 callTraceInfo = pyqtSignal(bool, str, str, str, str, str, str) |
155 appendStdout = pyqtSignal(str) |
156 appendStdout = pyqtSignal(str) |
156 |
157 |
157 def __init__(self, preventPassiveDebugging=False): |
158 def __init__(self, originalPathString, preventPassiveDebugging=False): |
158 """ |
159 """ |
159 Constructor |
160 Constructor |
160 |
161 |
|
162 @param originalPathString original PATH environment variable |
|
163 @type str |
161 @param preventPassiveDebugging flag overriding the PassiveDbgEnabled |
164 @param preventPassiveDebugging flag overriding the PassiveDbgEnabled |
162 setting (boolean) |
165 setting |
|
166 @type bool |
163 """ |
167 """ |
164 super(DebugServer, self).__init__() |
168 super(DebugServer, self).__init__() |
|
169 |
|
170 self.__originalPathString = originalPathString |
165 |
171 |
166 self.__debuggerInterfaces = {} |
172 self.__debuggerInterfaces = {} |
167 # the interface name is the key, a function to get the |
173 # the interface name is the key, a function to get the |
168 # registration data is the value |
174 # registration data is the value |
169 self.__debuggerInterfaceRegistry = {} |
175 self.__debuggerInterfaceRegistry = {} |
496 if forProject: |
502 if forProject: |
497 project = e5App().getObject("Project") |
503 project = e5App().getObject("Project") |
498 if not project.isDebugPropertiesLoaded(): |
504 if not project.isDebugPropertiesLoaded(): |
499 self.clientProcess, isNetworked, clientInterpreter = \ |
505 self.clientProcess, isNetworked, clientInterpreter = \ |
500 self.debuggerInterface.startRemote( |
506 self.debuggerInterface.startRemote( |
501 self.serverPort(), runInConsole, venvName) |
507 self.serverPort(), runInConsole, venvName, |
|
508 self.__originalPathString) |
502 else: |
509 else: |
503 self.clientProcess, isNetworked, clientInterpreter = \ |
510 self.clientProcess, isNetworked, clientInterpreter = \ |
504 self.debuggerInterface.startRemoteForProject( |
511 self.debuggerInterface.startRemoteForProject( |
505 self.serverPort(), runInConsole, venvName) |
512 self.serverPort(), runInConsole, venvName, |
|
513 self.__originalPathString) |
506 else: |
514 else: |
507 self.clientProcess, isNetworked, clientInterpreter = \ |
515 self.clientProcess, isNetworked, clientInterpreter = \ |
508 self.debuggerInterface.startRemote( |
516 self.debuggerInterface.startRemote( |
509 self.serverPort(), runInConsole, venvName) |
517 self.serverPort(), runInConsole, venvName, |
|
518 self.__originalPathString) |
510 |
519 |
511 if self.clientProcess: |
520 if self.clientProcess: |
512 self.clientProcess.readyReadStandardError.connect( |
521 self.clientProcess.readyReadStandardError.connect( |
513 self.__clientProcessError) |
522 self.__clientProcessError) |
514 self.clientProcess.readyReadStandardOutput.connect( |
523 self.clientProcess.readyReadStandardOutput.connect( |
1539 @param prompt the input prompt (string) |
1548 @param prompt the input prompt (string) |
1540 @param echo flag indicating an echoing of the input (boolean) |
1549 @param echo flag indicating an echoing of the input (boolean) |
1541 """ |
1550 """ |
1542 self.clientRawInput.emit(prompt, echo) |
1551 self.clientRawInput.emit(prompt, echo) |
1543 |
1552 |
1544 def signalClientBanner(self, version, platform, debugClient): |
1553 def signalClientBanner(self, version, platform, debugClient, venvName): |
1545 """ |
1554 """ |
1546 Public method to process the client banner info. |
1555 Public method to process the client banner info. |
1547 |
1556 |
1548 @param version interpreter version info (string) |
1557 @param version interpreter version info |
1549 @param platform hostname of the client (string) |
1558 @type str |
1550 @param debugClient additional debugger type info (string) |
1559 @param platform hostname of the client |
1551 """ |
1560 @type str |
1552 self.clientBanner.emit(version, platform, debugClient) |
1561 @param debugClient additional debugger type info |
1553 |
1562 @type str |
1554 def signalClientCapabilities(self, capabilities, clientType): |
1563 @param venvName name of the virtual environment |
|
1564 @type str |
|
1565 """ |
|
1566 self.clientBanner.emit(version, platform, debugClient, venvName) |
|
1567 |
|
1568 def signalClientCapabilities(self, capabilities, clientType, venvName): |
1555 """ |
1569 """ |
1556 Public method to process the client capabilities info. |
1570 Public method to process the client capabilities info. |
1557 |
1571 |
1558 @param capabilities bitmaks with the client capabilities (integer) |
1572 @param capabilities bitmaks with the client capabilities |
1559 @param clientType type of the debug client (string) |
1573 @type int |
|
1574 @param clientType type of the debug client |
|
1575 @type str |
|
1576 @param venvName name of the virtual environment |
|
1577 @type str |
1560 """ |
1578 """ |
1561 try: |
1579 try: |
1562 self.__debuggerInterfaceRegistry[clientType][0] = capabilities |
1580 self.__debuggerInterfaceRegistry[clientType][0] = capabilities |
1563 self.clientCapabilities.emit(capabilities, clientType) |
1581 self.clientCapabilities.emit(capabilities, clientType, venvName) |
1564 except KeyError: |
1582 except KeyError: |
1565 # ignore silently |
1583 # ignore silently |
1566 pass |
1584 pass |
1567 |
1585 |
1568 def signalClientCompletionList(self, completionList, text): |
1586 def signalClientCompletionList(self, completionList, text): |