130 if not proc.waitForStarted(10000): |
130 if not proc.waitForStarted(10000): |
131 proc = None |
131 proc = None |
132 |
132 |
133 return proc |
133 return proc |
134 |
134 |
135 def startRemote(self, port, runInConsole): |
135 def startRemote(self, port, runInConsole, interpreter): |
136 """ |
136 """ |
137 Public method to start a remote Python interpreter. |
137 Public method to start a remote Python interpreter. |
138 |
138 |
139 @param port portnumber the debug server is listening on (integer) |
139 @param port port number the debug server is listening on (integer) |
140 @param runInConsole flag indicating to start the debugger in a |
140 @param runInConsole flag indicating to start the debugger in a |
141 console window (boolean) |
141 console window (boolean) |
|
142 @param interpreter interpreter to be used to execute the remote |
|
143 side (string) |
142 @return client process object (QProcess), a flag to indicate |
144 @return client process object (QProcess), a flag to indicate |
143 a network connection (boolean) and the name of the interpreter |
145 a network connection (boolean) and the name of the interpreter |
144 in case of a local execution (string) |
146 in case of a local execution (string) |
145 """ |
147 """ |
146 if self.__variant == "Python2": |
148 if not interpreter: |
147 interpreter = Preferences.getDebugger("PythonInterpreter") |
149 if self.__variant == "Python2": |
148 else: |
150 interpreter = Preferences.getDebugger("PythonInterpreter") |
149 interpreter = Preferences.getDebugger("Python3Interpreter") |
151 else: |
|
152 interpreter = Preferences.getDebugger("Python3Interpreter") |
150 if interpreter == "": |
153 if interpreter == "": |
151 E5MessageBox.critical( |
154 E5MessageBox.critical( |
152 None, |
155 None, |
153 self.tr("Start Debugger"), |
156 self.tr("Start Debugger"), |
154 self.tr( |
157 self.tr( |
261 self.tr("Start Debugger"), |
264 self.tr("Start Debugger"), |
262 self.tr( |
265 self.tr( |
263 """<p>The debugger backend could not be started.</p>""")) |
266 """<p>The debugger backend could not be started.</p>""")) |
264 return process, self.__isNetworked, interpreter |
267 return process, self.__isNetworked, interpreter |
265 |
268 |
266 def startRemoteForProject(self, port, runInConsole): |
269 def startRemoteForProject(self, port, runInConsole, interpreter): |
267 """ |
270 """ |
268 Public method to start a remote Python interpreter for a project. |
271 Public method to start a remote Python interpreter for a project. |
269 |
272 |
270 @param port portnumber the debug server is listening on (integer) |
273 @param port port number the debug server is listening on (integer) |
271 @param runInConsole flag indicating to start the debugger in a |
274 @param runInConsole flag indicating to start the debugger in a |
272 console window (boolean) |
275 console window (boolean) |
|
276 @param interpreter interpreter to be used to execute the remote |
|
277 side (string) |
273 @return client process object (QProcess), a flag to indicate |
278 @return client process object (QProcess), a flag to indicate |
274 a network connection (boolean) and the name of the interpreter |
279 a network connection (boolean) and the name of the interpreter |
275 in case of a local execution (string) |
280 in case of a local execution (string) |
276 """ |
281 """ |
277 project = e5App().getObject("Project") |
282 project = e5App().getObject("Project") |
278 if not project.isDebugPropertiesLoaded(): |
283 if not project.isDebugPropertiesLoaded(): |
279 return None, self.__isNetworked, "" |
284 return None, self.__isNetworked, "" |
280 |
285 |
281 # start debugger with project specific settings |
286 # start debugger with project specific settings |
282 interpreter = project.getDebugProperty("INTERPRETER") |
287 if not interpreter: |
|
288 interpreter = project.getDebugProperty("INTERPRETER") |
283 debugClient = project.getDebugProperty("DEBUGCLIENT") |
289 debugClient = project.getDebugProperty("DEBUGCLIENT") |
284 |
290 |
285 redirect = str(project.getDebugProperty("REDIRECT")) |
291 redirect = str(project.getDebugProperty("REDIRECT")) |
286 noencoding = \ |
292 noencoding = \ |
287 project.getDebugProperty("NOENCODING") and '--no-encoding' or '' |
293 project.getDebugProperty("NOENCODING") and '--no-encoding' or '' |