153 @return client process object (QProcess) and a flag to indicate |
153 @return client process object (QProcess) and a flag to indicate |
154 a network connection (boolean) |
154 a network connection (boolean) |
155 """ |
155 """ |
156 interpreter = Preferences.getDebugger("PythonInterpreter") |
156 interpreter = Preferences.getDebugger("PythonInterpreter") |
157 if interpreter == "": |
157 if interpreter == "": |
158 E5MessageBox.critical(None, |
158 E5MessageBox.critical( |
|
159 None, |
159 self.trUtf8("Start Debugger"), |
160 self.trUtf8("Start Debugger"), |
160 self.trUtf8( |
161 self.trUtf8( |
161 """<p>No Python2 interpreter configured.</p>""")) |
162 """<p>No Python2 interpreter configured.</p>""")) |
162 return None, False |
163 return None, False |
163 |
164 |
192 [rhost, interpreter, os.path.abspath(debugClient), |
193 [rhost, interpreter, os.path.abspath(debugClient), |
193 noencoding, str(port), redirect, ipaddr] |
194 noencoding, str(port), redirect, ipaddr] |
194 args[0] = Utilities.getExecutablePath(args[0]) |
195 args[0] = Utilities.getExecutablePath(args[0]) |
195 process = self.__startProcess(args[0], args[1:]) |
196 process = self.__startProcess(args[0], args[1:]) |
196 if process is None: |
197 if process is None: |
197 E5MessageBox.critical(None, |
198 E5MessageBox.critical( |
|
199 None, |
198 self.trUtf8("Start Debugger"), |
200 self.trUtf8("Start Debugger"), |
199 self.trUtf8( |
201 self.trUtf8( |
200 """<p>The debugger backend could not be""" |
202 """<p>The debugger backend could not be""" |
201 """ started.</p>""")) |
203 """ started.</p>""")) |
202 |
204 |
238 [interpreter, os.path.abspath(debugClient), |
240 [interpreter, os.path.abspath(debugClient), |
239 noencoding, str(port), '0', ipaddr] |
241 noencoding, str(port), '0', ipaddr] |
240 args[0] = Utilities.getExecutablePath(args[0]) |
242 args[0] = Utilities.getExecutablePath(args[0]) |
241 process = self.__startProcess(args[0], args[1:], clientEnv) |
243 process = self.__startProcess(args[0], args[1:], clientEnv) |
242 if process is None: |
244 if process is None: |
243 E5MessageBox.critical(None, |
245 E5MessageBox.critical( |
|
246 None, |
244 self.trUtf8("Start Debugger"), |
247 self.trUtf8("Start Debugger"), |
245 self.trUtf8( |
248 self.trUtf8( |
246 """<p>The debugger backend could not be""" |
249 """<p>The debugger backend could not be""" |
247 """ started.</p>""")) |
250 """ started.</p>""")) |
248 return process, self.__isNetworked |
251 return process, self.__isNetworked |
249 |
252 |
250 process = self.__startProcess(interpreter, |
253 process = self.__startProcess(interpreter, |
251 [debugClient, noencoding, str(port), redirect, ipaddr], |
254 [debugClient, noencoding, str(port), redirect, ipaddr], |
252 clientEnv) |
255 clientEnv) |
253 if process is None: |
256 if process is None: |
254 E5MessageBox.critical(None, |
257 E5MessageBox.critical( |
|
258 None, |
255 self.trUtf8("Start Debugger"), |
259 self.trUtf8("Start Debugger"), |
256 self.trUtf8( |
260 self.trUtf8( |
257 """<p>The debugger backend could not be started.</p>""")) |
261 """<p>The debugger backend could not be started.</p>""")) |
258 return process, self.__isNetworked |
262 return process, self.__isNetworked |
259 |
263 |
290 [rhost, interpreter, os.path.abspath(debugClient), |
294 [rhost, interpreter, os.path.abspath(debugClient), |
291 noencoding, str(port), redirect, ipaddr] |
295 noencoding, str(port), redirect, ipaddr] |
292 args[0] = Utilities.getExecutablePath(args[0]) |
296 args[0] = Utilities.getExecutablePath(args[0]) |
293 process = self.__startProcess(args[0], args[1:]) |
297 process = self.__startProcess(args[0], args[1:]) |
294 if process is None: |
298 if process is None: |
295 E5MessageBox.critical(None, |
299 E5MessageBox.critical( |
|
300 None, |
296 self.trUtf8("Start Debugger"), |
301 self.trUtf8("Start Debugger"), |
297 self.trUtf8( |
302 self.trUtf8( |
298 """<p>The debugger backend could not be""" |
303 """<p>The debugger backend could not be""" |
299 """ started.</p>""")) |
304 """ started.</p>""")) |
300 # set translation function |
305 # set translation function |
336 [interpreter, os.path.abspath(debugClient), |
341 [interpreter, os.path.abspath(debugClient), |
337 noencoding, str(port), '0', ipaddr] |
342 noencoding, str(port), '0', ipaddr] |
338 args[0] = Utilities.getExecutablePath(args[0]) |
343 args[0] = Utilities.getExecutablePath(args[0]) |
339 process = self.__startProcess(args[0], args[1:], clientEnv) |
344 process = self.__startProcess(args[0], args[1:], clientEnv) |
340 if process is None: |
345 if process is None: |
341 E5MessageBox.critical(None, |
346 E5MessageBox.critical( |
|
347 None, |
342 self.trUtf8("Start Debugger"), |
348 self.trUtf8("Start Debugger"), |
343 self.trUtf8( |
349 self.trUtf8( |
344 """<p>The debugger backend could not be""" |
350 """<p>The debugger backend could not be""" |
345 """ started.</p>""")) |
351 """ started.</p>""")) |
346 return process, self.__isNetworked |
352 return process, self.__isNetworked |
347 |
353 |
348 process = self.__startProcess(interpreter, |
354 process = self.__startProcess(interpreter, |
349 [debugClient, noencoding, str(port), redirect, ipaddr], |
355 [debugClient, noencoding, str(port), redirect, ipaddr], |
350 clientEnv) |
356 clientEnv) |
351 if process is None: |
357 if process is None: |
352 E5MessageBox.critical(None, |
358 E5MessageBox.critical( |
|
359 None, |
353 self.trUtf8("Start Debugger"), |
360 self.trUtf8("Start Debugger"), |
354 self.trUtf8( |
361 self.trUtf8( |
355 """<p>The debugger backend could not be started.</p>""")) |
362 """<p>The debugger backend could not be started.</p>""")) |
356 return process, self.__isNetworked |
363 return process, self.__isNetworked |
357 |
364 |