208 process = self.__startProcess(args[0], args[1:], clientEnv) |
211 process = self.__startProcess(args[0], args[1:], clientEnv) |
209 if process is None: |
212 if process is None: |
210 E5MessageBox.critical(None, |
213 E5MessageBox.critical(None, |
211 self.trUtf8("Start Debugger"), |
214 self.trUtf8("Start Debugger"), |
212 self.trUtf8( |
215 self.trUtf8( |
213 """<p>The debugger backend could not be started.</p>""")) |
216 """<p>The debugger backend could not be""" |
|
217 """ started.</p>""")) |
214 return process, self.__isNetworked |
218 return process, self.__isNetworked |
215 |
219 |
216 process = self.__startProcess(interpreter, |
220 process = self.__startProcess(interpreter, |
217 [debugClient, str(port), redirect, ipaddr], |
221 [debugClient, str(port), redirect, ipaddr], |
218 clientEnv) |
222 clientEnv) |
219 if process is None: |
223 if process is None: |
220 E5MessageBox.critical(None, |
224 E5MessageBox.critical(None, |
221 self.trUtf8("Start Debugger"), |
225 self.trUtf8("Start Debugger"), |
222 self.trUtf8("""<p>The debugger backend could not be started.</p>""")) |
226 self.trUtf8( |
|
227 """<p>The debugger backend could not be started.</p>""")) |
223 return process, self.__isNetworked |
228 return process, self.__isNetworked |
224 |
229 |
225 def startRemoteForProject(self, port, runInConsole): |
230 def startRemoteForProject(self, port, runInConsole): |
226 """ |
231 """ |
227 Public method to start a remote Ruby interpreter for a project. |
232 Public method to start a remote Ruby interpreter for a project. |
256 process = self.__startProcess(args[0], args[1:]) |
261 process = self.__startProcess(args[0], args[1:]) |
257 if process is None: |
262 if process is None: |
258 E5MessageBox.critical(None, |
263 E5MessageBox.critical(None, |
259 self.trUtf8("Start Debugger"), |
264 self.trUtf8("Start Debugger"), |
260 self.trUtf8( |
265 self.trUtf8( |
261 """<p>The debugger backend could not be started.</p>""")) |
266 """<p>The debugger backend could not be""" |
|
267 """ started.</p>""")) |
262 # set translation function |
268 # set translation function |
263 if project.getDebugProperty("PATHTRANSLATION"): |
269 if project.getDebugProperty("PATHTRANSLATION"): |
264 self.translateRemote = project.getDebugProperty("REMOTEPATH") |
270 self.translateRemote = \ |
265 self.translateLocal = project.getDebugProperty("LOCALPATH") |
271 project.getDebugProperty("REMOTEPATH") |
|
272 self.translateLocal = \ |
|
273 project.getDebugProperty("LOCALPATH") |
266 self.translate = self.__remoteTranslation |
274 self.translate = self.__remoteTranslation |
267 else: |
275 else: |
268 self.translate = self.__identityTranslation |
276 self.translate = self.__identityTranslation |
269 return process, self.__isNetworked |
277 return process, self.__isNetworked |
270 |
278 |
299 process = self.__startProcess(args[0], args[1:], clientEnv) |
307 process = self.__startProcess(args[0], args[1:], clientEnv) |
300 if process is None: |
308 if process is None: |
301 E5MessageBox.critical(None, |
309 E5MessageBox.critical(None, |
302 self.trUtf8("Start Debugger"), |
310 self.trUtf8("Start Debugger"), |
303 self.trUtf8( |
311 self.trUtf8( |
304 """<p>The debugger backend could not be started.</p>""")) |
312 """<p>The debugger backend could not be""" |
|
313 """ started.</p>""")) |
305 return process, self.__isNetworked |
314 return process, self.__isNetworked |
306 |
315 |
307 process = self.__startProcess(interpreter, |
316 process = self.__startProcess(interpreter, |
308 [debugClient, str(port), redirect, ipaddr], |
317 [debugClient, str(port), redirect, ipaddr], |
309 clientEnv) |
318 clientEnv) |
310 if process is None: |
319 if process is None: |
311 E5MessageBox.critical(None, |
320 E5MessageBox.critical(None, |
312 self.trUtf8("Start Debugger"), |
321 self.trUtf8("Start Debugger"), |
313 self.trUtf8("""<p>The debugger backend could not be started.</p>""")) |
322 self.trUtf8( |
|
323 """<p>The debugger backend could not be started.</p>""")) |
314 return process, self.__isNetworked |
324 return process, self.__isNetworked |
315 |
325 |
316 def getClientCapabilities(self): |
326 def getClientCapabilities(self): |
317 """ |
327 """ |
318 Public method to retrieve the debug clients capabilities. |
328 Public method to retrieve the debug clients capabilities. |
388 """ |
398 """ |
389 Public method to set the environment for a program to debug, run, ... |
399 Public method to set the environment for a program to debug, run, ... |
390 |
400 |
391 @param env environment settings (dictionary) |
401 @param env environment settings (dictionary) |
392 """ |
402 """ |
393 self.__sendCommand('{0}{1}\n'.format(DebugProtocol.RequestEnv, str(env))) |
403 self.__sendCommand('{0}{1}\n'.format( |
394 |
404 DebugProtocol.RequestEnv, str(env))) |
395 def remoteLoad(self, fn, argv, wd, traceInterpreter=False, autoContinue=True, |
405 |
396 autoFork=False, forkChild=False): |
406 def remoteLoad(self, fn, argv, wd, traceInterpreter=False, |
|
407 autoContinue=True, autoFork=False, forkChild=False): |
397 """ |
408 """ |
398 Public method to load a new program to debug. |
409 Public method to load a new program to debug. |
399 |
410 |
400 @param fn the filename to debug (string) |
411 @param fn the filename to debug (string) |
401 @param argv the commandline arguments to pass to the program (string) |
412 @param argv the commandline arguments to pass to the program (string) |
402 @param wd the working directory for the program (string) |
413 @param wd the working directory for the program (string) |
403 @keyparam traceInterpreter flag indicating if the interpreter library should be |
414 @keyparam traceInterpreter flag indicating if the interpreter library |
404 traced as well (boolean) |
415 should be traced as well (boolean) |
405 @keyparam autoContinue flag indicating, that the debugger should not stop |
416 @keyparam autoContinue flag indicating, that the debugger should not |
406 at the first executable line (boolean) |
417 stop at the first executable line (boolean) |
407 @keyparam autoFork flag indicating the automatic fork mode (boolean) (ignored) |
418 @keyparam autoFork flag indicating the automatic fork mode (boolean) |
|
419 (ignored) |
408 @keyparam forkChild flag indicating to debug the child after forking |
420 @keyparam forkChild flag indicating to debug the child after forking |
409 (boolean) (ignored) |
421 (boolean) (ignored) |
410 """ |
422 """ |
411 self.__autoContinue = autoContinue |
423 self.__autoContinue = autoContinue |
412 |
424 |
413 wd = self.translate(wd, False) |
425 wd = self.translate(wd, False) |
414 fn = self.translate(os.path.abspath(fn), False) |
426 fn = self.translate(os.path.abspath(fn), False) |
415 self.__sendCommand('{0}{1}|{2}|{3}|{4:d}\n'.format( |
427 self.__sendCommand('{0}{1}|{2}|{3}|{4:d}\n'.format( |
416 DebugProtocol.RequestLoad, wd, fn, str(Utilities.parseOptionString(argv)), |
428 DebugProtocol.RequestLoad, wd, fn, |
417 traceInterpreter)) |
429 str(Utilities.parseOptionString(argv)), |
|
430 traceInterpreter)) |
418 |
431 |
419 def remoteRun(self, fn, argv, wd, autoFork=False, forkChild=False): |
432 def remoteRun(self, fn, argv, wd, autoFork=False, forkChild=False): |
420 """ |
433 """ |
421 Public method to load a new program to run. |
434 Public method to load a new program to run. |
422 |
435 |
423 @param fn the filename to run (string) |
436 @param fn the filename to run (string) |
424 @param argv the commandline arguments to pass to the program (string) |
437 @param argv the commandline arguments to pass to the program (string) |
425 @param wd the working directory for the program (string) |
438 @param wd the working directory for the program (string) |
426 @keyparam autoFork flag indicating the automatic fork mode (boolean) (ignored) |
439 @keyparam autoFork flag indicating the automatic fork mode (boolean) |
|
440 (ignored) |
427 @keyparam forkChild flag indicating to debug the child after forking |
441 @keyparam forkChild flag indicating to debug the child after forking |
428 (boolean) (ignored) |
442 (boolean) (ignored) |
429 """ |
443 """ |
430 wd = self.translate(wd, False) |
444 wd = self.translate(wd, False) |
431 fn = self.translate(os.path.abspath(fn), False) |
445 fn = self.translate(os.path.abspath(fn), False) |
432 self.__sendCommand('{0}{1}|{2}|{3}\n'.format( |
446 self.__sendCommand('{0}{1}|{2}|{3}\n'.format( |
433 DebugProtocol.RequestRun, wd, fn, str(Utilities.parseOptionString(argv)))) |
447 DebugProtocol.RequestRun, wd, fn, |
|
448 str(Utilities.parseOptionString(argv)))) |
434 |
449 |
435 def remoteCoverage(self, fn, argv, wd, erase=False): |
450 def remoteCoverage(self, fn, argv, wd, erase=False): |
436 """ |
451 """ |
437 Public method to load a new program to collect coverage data. |
452 Public method to load a new program to collect coverage data. |
438 |
453 |
439 @param fn the filename to run (string) |
454 @param fn the filename to run (string) |
440 @param argv the commandline arguments to pass to the program (string) |
455 @param argv the commandline arguments to pass to the program (string) |
441 @param wd the working directory for the program (string) |
456 @param wd the working directory for the program (string) |
442 @keyparam erase flag indicating that coverage info should be |
457 @keyparam erase flag indicating that coverage info should be |
443 cleared first (boolean) |
458 cleared first (boolean) |
|
459 @exception NotImplementedError raised to indicate that this interface |
|
460 is not supported |
444 """ |
461 """ |
445 raise NotImplementedError("Interface not available.") |
462 raise NotImplementedError("Interface not available.") |
446 |
463 |
447 def remoteProfile(self, fn, argv, wd, erase=False): |
464 def remoteProfile(self, fn, argv, wd, erase=False): |
448 """ |
465 """ |
449 Public method to load a new program to collect profiling data. |
466 Public method to load a new program to collect profiling data. |
450 |
467 |
451 @param fn the filename to run (string) |
468 @param fn the filename to run (string) |
452 @param argv the commandline arguments to pass to the program (string) |
469 @param argv the commandline arguments to pass to the program (string) |
453 @param wd the working directory for the program (string) |
470 @param wd the working directory for the program (string) |
454 @keyparam erase flag indicating that timing info should be cleared first (boolean) |
471 @keyparam erase flag indicating that timing info should be cleared |
|
472 first (boolean) |
|
473 @exception NotImplementedError raised to indicate that this interface |
|
474 is not supported |
455 """ |
475 """ |
456 raise NotImplementedError("Interface not available.") |
476 raise NotImplementedError("Interface not available.") |
457 |
477 |
458 def remoteStatement(self, stmt): |
478 def remoteStatement(self, stmt): |
459 """ |
479 """ |
507 @param cond condition of the breakpoint (string) |
528 @param cond condition of the breakpoint (string) |
508 @param temp flag indicating a temporary breakpoint (boolean) |
529 @param temp flag indicating a temporary breakpoint (boolean) |
509 """ |
530 """ |
510 fn = self.translate(fn, False) |
531 fn = self.translate(fn, False) |
511 self.__sendCommand('{0}{1}@@{2:d}@@{3:d}@@{4:d}@@{5}\n'.format( |
532 self.__sendCommand('{0}{1}@@{2:d}@@{3:d}@@{4:d}@@{5}\n'.format( |
512 DebugProtocol.RequestBreak, fn, line, temp, set, cond)) |
533 DebugProtocol.RequestBreak, fn, line, temp, set, cond)) |
513 |
534 |
514 def remoteBreakpointEnable(self, fn, line, enable): |
535 def remoteBreakpointEnable(self, fn, line, enable): |
515 """ |
536 """ |
516 Public method to enable or disable a breakpoint. |
537 Public method to enable or disable a breakpoint. |
517 |
538 |
518 @param fn filename the breakpoint belongs to (string) |
539 @param fn filename the breakpoint belongs to (string) |
519 @param line linenumber of the breakpoint (int) |
540 @param line linenumber of the breakpoint (int) |
520 @param enable flag indicating enabling or disabling a breakpoint (boolean) |
541 @param enable flag indicating enabling or disabling a breakpoint |
|
542 (boolean) |
521 """ |
543 """ |
522 fn = self.translate(fn, False) |
544 fn = self.translate(fn, False) |
523 self.__sendCommand('{0}{1},{2:d},{3:d}\n'.format( |
545 self.__sendCommand('{0}{1},{2:d},{3:d}\n'.format( |
524 DebugProtocol.RequestBreakEnable, fn, line, enable)) |
546 DebugProtocol.RequestBreakEnable, fn, line, enable)) |
525 |
547 |
550 def remoteWatchpointEnable(self, cond, enable): |
573 def remoteWatchpointEnable(self, cond, enable): |
551 """ |
574 """ |
552 Public method to enable or disable a watch expression. |
575 Public method to enable or disable a watch expression. |
553 |
576 |
554 @param cond expression of the watch expression (string) |
577 @param cond expression of the watch expression (string) |
555 @param enable flag indicating enabling or disabling a watch expression (boolean) |
578 @param enable flag indicating enabling or disabling a watch expression |
|
579 (boolean) |
556 """ |
580 """ |
557 # cond is combination of cond and special (s. watch expression viewer) |
581 # cond is combination of cond and special (s. watch expression viewer) |
558 self.__sendCommand('{0}{1},{2:d}\n'.format( |
582 self.__sendCommand('{0}{1},{2:d}\n'.format( |
559 DebugProtocol.RequestWatchEnable, cond, enable)) |
583 DebugProtocol.RequestWatchEnable, cond, enable)) |
560 |
584 |
561 def remoteWatchpointIgnore(self, cond, count): |
585 def remoteWatchpointIgnore(self, cond, count): |
562 """ |
586 """ |
563 Public method to ignore a watch expression the next couple of occurrences. |
587 Public method to ignore a watch expression the next couple of |
|
588 occurrences. |
564 |
589 |
565 @param cond expression of the watch expression (string) |
590 @param cond expression of the watch expression (string) |
566 @param count number of occurrences to ignore (int) |
591 @param count number of occurrences to ignore (int) |
567 """ |
592 """ |
568 # cond is combination of cond and special (s. watch expression viewer) |
593 # cond is combination of cond and special (s. watch expression viewer) |
665 Public slot to get the a list of possible commandline completions |
693 Public slot to get the a list of possible commandline completions |
666 from the remote client. |
694 from the remote client. |
667 |
695 |
668 @param text the text to be completed (string) |
696 @param text the text to be completed (string) |
669 """ |
697 """ |
670 self.__sendCommand("{0}{1}\n".format(DebugProtocol.RequestCompletion, text)) |
698 self.__sendCommand("{0}{1}\n".format( |
|
699 DebugProtocol.RequestCompletion, text)) |
671 |
700 |
672 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase): |
701 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase): |
673 """ |
702 """ |
674 Public method to prepare a new unittest run. |
703 Public method to prepare a new unittest run. |
675 |
704 |
676 @param fn the filename to load (string) |
705 @param fn the filename to load (string) |
677 @param tn the testname to load (string) |
706 @param tn the testname to load (string) |
678 @param tfn the test function name to load tests from (string) |
707 @param tfn the test function name to load tests from (string) |
679 @param failed list of failed test, if only failed test should be run |
708 @param failed list of failed test, if only failed test should be run |
680 (list of strings) |
709 (list of strings) |
681 @param cov flag indicating collection of coverage data is requested (boolean) |
710 @param cov flag indicating collection of coverage data is requested |
|
711 (boolean) |
682 @param covname filename to be used to assemble the coverage caches |
712 @param covname filename to be used to assemble the coverage caches |
683 filename (string) |
713 filename (string) |
684 @param coverase flag indicating erasure of coverage data is requested (boolean) |
714 @param coverase flag indicating erasure of coverage data is requested |
|
715 (boolean) |
|
716 @exception NotImplementedError raised to indicate that this interface |
|
717 is not supported |
685 """ |
718 """ |
686 raise NotImplementedError("Interface not available.") |
719 raise NotImplementedError("Interface not available.") |
687 |
720 |
688 def remoteUTRun(self): |
721 def remoteUTRun(self): |
689 """ |
722 """ |
690 Public method to start a unittest run. |
723 Public method to start a unittest run. |
|
724 |
|
725 @exception NotImplementedError raised to indicate that this interface |
|
726 is not supported |
691 """ |
727 """ |
692 raise NotImplementedError("Interface not available.") |
728 raise NotImplementedError("Interface not available.") |
693 |
729 |
694 def remoteUTStop(self): |
730 def remoteUTStop(self): |
695 """ |
731 """ |
696 public method to stop a unittest run. |
732 Public method to stop a unittest run. |
|
733 |
|
734 @exception NotImplementedError raised to indicate that this interface |
|
735 is not supported |
697 """ |
736 """ |
698 raise NotImplementedError("Interface not available.") |
737 raise NotImplementedError("Interface not available.") |
699 |
738 |
700 def __parseClientLine(self): |
739 def __parseClientLine(self): |
701 """ |
740 """ |