206 process = self.__startProcess(args[0], args[1:], clientEnv) |
209 process = self.__startProcess(args[0], args[1:], clientEnv) |
207 if process is None: |
210 if process is None: |
208 E5MessageBox.critical(None, |
211 E5MessageBox.critical(None, |
209 self.trUtf8("Start Debugger"), |
212 self.trUtf8("Start Debugger"), |
210 self.trUtf8( |
213 self.trUtf8( |
211 """<p>The debugger backend could not be started.</p>""")) |
214 """<p>The debugger backend could not be""" |
|
215 """ started.</p>""")) |
212 return process, self.__isNetworked |
216 return process, self.__isNetworked |
213 |
217 |
214 process = self.__startProcess(interpreter, |
218 process = self.__startProcess(interpreter, |
215 [debugClient, str(port), redirect, ipaddr], |
219 [debugClient, str(port), redirect, ipaddr], |
216 clientEnv) |
220 clientEnv) |
217 if process is None: |
221 if process is None: |
218 E5MessageBox.critical(None, |
222 E5MessageBox.critical(None, |
219 self.trUtf8("Start Debugger"), |
223 self.trUtf8("Start Debugger"), |
220 self.trUtf8("""<p>The debugger backend could not be started.</p>""")) |
224 self.trUtf8( |
|
225 """<p>The debugger backend could not be started.</p>""")) |
221 return process, self.__isNetworked |
226 return process, self.__isNetworked |
222 |
227 |
223 def startRemoteForProject(self, port, runInConsole): |
228 def startRemoteForProject(self, port, runInConsole): |
224 """ |
229 """ |
225 Public method to start a remote Ruby interpreter for a project. |
230 Public method to start a remote Ruby interpreter for a project. |
254 process = self.__startProcess(args[0], args[1:]) |
259 process = self.__startProcess(args[0], args[1:]) |
255 if process is None: |
260 if process is None: |
256 E5MessageBox.critical(None, |
261 E5MessageBox.critical(None, |
257 self.trUtf8("Start Debugger"), |
262 self.trUtf8("Start Debugger"), |
258 self.trUtf8( |
263 self.trUtf8( |
259 """<p>The debugger backend could not be started.</p>""")) |
264 """<p>The debugger backend could not be""" |
|
265 """ started.</p>""")) |
260 # set translation function |
266 # set translation function |
261 if project.getDebugProperty("PATHTRANSLATION"): |
267 if project.getDebugProperty("PATHTRANSLATION"): |
262 self.translateRemote = project.getDebugProperty("REMOTEPATH") |
268 self.translateRemote = \ |
263 self.translateLocal = project.getDebugProperty("LOCALPATH") |
269 project.getDebugProperty("REMOTEPATH") |
|
270 self.translateLocal = \ |
|
271 project.getDebugProperty("LOCALPATH") |
264 self.translate = self.__remoteTranslation |
272 self.translate = self.__remoteTranslation |
265 else: |
273 else: |
266 self.translate = self.__identityTranslation |
274 self.translate = self.__identityTranslation |
267 return process, self.__isNetworked |
275 return process, self.__isNetworked |
268 |
276 |
297 process = self.__startProcess(args[0], args[1:], clientEnv) |
305 process = self.__startProcess(args[0], args[1:], clientEnv) |
298 if process is None: |
306 if process is None: |
299 E5MessageBox.critical(None, |
307 E5MessageBox.critical(None, |
300 self.trUtf8("Start Debugger"), |
308 self.trUtf8("Start Debugger"), |
301 self.trUtf8( |
309 self.trUtf8( |
302 """<p>The debugger backend could not be started.</p>""")) |
310 """<p>The debugger backend could not be""" |
|
311 """ started.</p>""")) |
303 return process, self.__isNetworked |
312 return process, self.__isNetworked |
304 |
313 |
305 process = self.__startProcess(interpreter, |
314 process = self.__startProcess(interpreter, |
306 [debugClient, str(port), redirect, ipaddr], |
315 [debugClient, str(port), redirect, ipaddr], |
307 clientEnv) |
316 clientEnv) |
308 if process is None: |
317 if process is None: |
309 E5MessageBox.critical(None, |
318 E5MessageBox.critical(None, |
310 self.trUtf8("Start Debugger"), |
319 self.trUtf8("Start Debugger"), |
311 self.trUtf8("""<p>The debugger backend could not be started.</p>""")) |
320 self.trUtf8( |
|
321 """<p>The debugger backend could not be started.</p>""")) |
312 return process, self.__isNetworked |
322 return process, self.__isNetworked |
313 |
323 |
314 def getClientCapabilities(self): |
324 def getClientCapabilities(self): |
315 """ |
325 """ |
316 Public method to retrieve the debug clients capabilities. |
326 Public method to retrieve the debug clients capabilities. |
386 """ |
396 """ |
387 Public method to set the environment for a program to debug, run, ... |
397 Public method to set the environment for a program to debug, run, ... |
388 |
398 |
389 @param env environment settings (dictionary) |
399 @param env environment settings (dictionary) |
390 """ |
400 """ |
391 self.__sendCommand('{0}{1}\n'.format(DebugProtocol.RequestEnv, str(env))) |
401 self.__sendCommand('{0}{1}\n'.format( |
392 |
402 DebugProtocol.RequestEnv, str(env))) |
393 def remoteLoad(self, fn, argv, wd, traceInterpreter=False, autoContinue=True, |
403 |
394 autoFork=False, forkChild=False): |
404 def remoteLoad(self, fn, argv, wd, traceInterpreter=False, |
|
405 autoContinue=True, autoFork=False, forkChild=False): |
395 """ |
406 """ |
396 Public method to load a new program to debug. |
407 Public method to load a new program to debug. |
397 |
408 |
398 @param fn the filename to debug (string) |
409 @param fn the filename to debug (string) |
399 @param argv the commandline arguments to pass to the program (string) |
410 @param argv the commandline arguments to pass to the program (string) |
400 @param wd the working directory for the program (string) |
411 @param wd the working directory for the program (string) |
401 @keyparam traceInterpreter flag indicating if the interpreter library should be |
412 @keyparam traceInterpreter flag indicating if the interpreter library |
402 traced as well (boolean) |
413 should be traced as well (boolean) |
403 @keyparam autoContinue flag indicating, that the debugger should not stop |
414 @keyparam autoContinue flag indicating, that the debugger should not |
404 at the first executable line (boolean) |
415 stop at the first executable line (boolean) |
405 @keyparam autoFork flag indicating the automatic fork mode (boolean) (ignored) |
416 @keyparam autoFork flag indicating the automatic fork mode (boolean) |
|
417 (ignored) |
406 @keyparam forkChild flag indicating to debug the child after forking |
418 @keyparam forkChild flag indicating to debug the child after forking |
407 (boolean) (ignored) |
419 (boolean) (ignored) |
408 """ |
420 """ |
409 self.__autoContinue = autoContinue |
421 self.__autoContinue = autoContinue |
410 |
422 |
411 wd = self.translate(wd, False) |
423 wd = self.translate(wd, False) |
412 fn = self.translate(os.path.abspath(fn), False) |
424 fn = self.translate(os.path.abspath(fn), False) |
413 self.__sendCommand('{0}{1}|{2}|{3}|{4:d}\n'.format( |
425 self.__sendCommand('{0}{1}|{2}|{3}|{4:d}\n'.format( |
414 DebugProtocol.RequestLoad, wd, fn, str(Utilities.parseOptionString(argv)), |
426 DebugProtocol.RequestLoad, wd, fn, |
415 traceInterpreter)) |
427 str(Utilities.parseOptionString(argv)), |
|
428 traceInterpreter)) |
416 |
429 |
417 def remoteRun(self, fn, argv, wd, autoFork=False, forkChild=False): |
430 def remoteRun(self, fn, argv, wd, autoFork=False, forkChild=False): |
418 """ |
431 """ |
419 Public method to load a new program to run. |
432 Public method to load a new program to run. |
420 |
433 |
421 @param fn the filename to run (string) |
434 @param fn the filename to run (string) |
422 @param argv the commandline arguments to pass to the program (string) |
435 @param argv the commandline arguments to pass to the program (string) |
423 @param wd the working directory for the program (string) |
436 @param wd the working directory for the program (string) |
424 @keyparam autoFork flag indicating the automatic fork mode (boolean) (ignored) |
437 @keyparam autoFork flag indicating the automatic fork mode (boolean) |
|
438 (ignored) |
425 @keyparam forkChild flag indicating to debug the child after forking |
439 @keyparam forkChild flag indicating to debug the child after forking |
426 (boolean) (ignored) |
440 (boolean) (ignored) |
427 """ |
441 """ |
428 wd = self.translate(wd, False) |
442 wd = self.translate(wd, False) |
429 fn = self.translate(os.path.abspath(fn), False) |
443 fn = self.translate(os.path.abspath(fn), False) |
430 self.__sendCommand('{0}{1}|{2}|{3}\n'.format( |
444 self.__sendCommand('{0}{1}|{2}|{3}\n'.format( |
431 DebugProtocol.RequestRun, wd, fn, str(Utilities.parseOptionString(argv)))) |
445 DebugProtocol.RequestRun, wd, fn, |
|
446 str(Utilities.parseOptionString(argv)))) |
432 |
447 |
433 def remoteCoverage(self, fn, argv, wd, erase=False): |
448 def remoteCoverage(self, fn, argv, wd, erase=False): |
434 """ |
449 """ |
435 Public method to load a new program to collect coverage data. |
450 Public method to load a new program to collect coverage data. |
436 |
451 |
509 @param cond condition of the breakpoint (string) |
526 @param cond condition of the breakpoint (string) |
510 @param temp flag indicating a temporary breakpoint (boolean) |
527 @param temp flag indicating a temporary breakpoint (boolean) |
511 """ |
528 """ |
512 fn = self.translate(fn, False) |
529 fn = self.translate(fn, False) |
513 self.__sendCommand('{0}{1}@@{2:d}@@{3:d}@@{4:d}@@{5}\n'.format( |
530 self.__sendCommand('{0}{1}@@{2:d}@@{3:d}@@{4:d}@@{5}\n'.format( |
514 DebugProtocol.RequestBreak, fn, line, temp, set, cond)) |
531 DebugProtocol.RequestBreak, fn, line, temp, set, cond)) |
515 |
532 |
516 def remoteBreakpointEnable(self, fn, line, enable): |
533 def remoteBreakpointEnable(self, fn, line, enable): |
517 """ |
534 """ |
518 Public method to enable or disable a breakpoint. |
535 Public method to enable or disable a breakpoint. |
519 |
536 |
520 @param fn filename the breakpoint belongs to (string) |
537 @param fn filename the breakpoint belongs to (string) |
521 @param line linenumber of the breakpoint (int) |
538 @param line linenumber of the breakpoint (int) |
522 @param enable flag indicating enabling or disabling a breakpoint (boolean) |
539 @param enable flag indicating enabling or disabling a breakpoint |
|
540 (boolean) |
523 """ |
541 """ |
524 fn = self.translate(fn, False) |
542 fn = self.translate(fn, False) |
525 self.__sendCommand('{0}{1},{2:d},{3:d}\n'.format( |
543 self.__sendCommand('{0}{1},{2:d},{3:d}\n'.format( |
526 DebugProtocol.RequestBreakEnable, fn, line, enable)) |
544 DebugProtocol.RequestBreakEnable, fn, line, enable)) |
527 |
545 |
540 def remoteWatchpoint(self, cond, set, temp=False): |
558 def remoteWatchpoint(self, cond, set, temp=False): |
541 """ |
559 """ |
542 Public method to set or clear a watch expression. |
560 Public method to set or clear a watch expression. |
543 |
561 |
544 @param cond expression of the watch expression (string) |
562 @param cond expression of the watch expression (string) |
545 @param set flag indicating setting or resetting a watch expression (boolean) |
563 @param set flag indicating setting or resetting a watch expression |
|
564 (boolean) |
546 @param temp flag indicating a temporary watch expression (boolean) |
565 @param temp flag indicating a temporary watch expression (boolean) |
547 """ |
566 """ |
548 # cond is combination of cond and special (s. watch expression viewer) |
567 # cond is combination of cond and special (s. watch expression viewer) |
549 self.__sendCommand('{0}{1}@@{2:d}@@{3:d}\n'.format( |
568 self.__sendCommand('{0}{1}@@{2:d}@@{3:d}\n'.format( |
550 DebugProtocol.RequestWatch, cond, temp, set)) |
569 DebugProtocol.RequestWatch, cond, temp, set)) |
552 def remoteWatchpointEnable(self, cond, enable): |
571 def remoteWatchpointEnable(self, cond, enable): |
553 """ |
572 """ |
554 Public method to enable or disable a watch expression. |
573 Public method to enable or disable a watch expression. |
555 |
574 |
556 @param cond expression of the watch expression (string) |
575 @param cond expression of the watch expression (string) |
557 @param enable flag indicating enabling or disabling a watch expression (boolean) |
576 @param enable flag indicating enabling or disabling a watch expression |
|
577 (boolean) |
558 """ |
578 """ |
559 # cond is combination of cond and special (s. watch expression viewer) |
579 # cond is combination of cond and special (s. watch expression viewer) |
560 self.__sendCommand('{0}{1},{2:d}\n'.format( |
580 self.__sendCommand('{0}{1},{2:d}\n'.format( |
561 DebugProtocol.RequestWatchEnable, cond, enable)) |
581 DebugProtocol.RequestWatchEnable, cond, enable)) |
562 |
582 |
563 def remoteWatchpointIgnore(self, cond, count): |
583 def remoteWatchpointIgnore(self, cond, count): |
564 """ |
584 """ |
565 Public method to ignore a watch expression the next couple of occurrences. |
585 Public method to ignore a watch expression the next couple of |
|
586 occurrences. |
566 |
587 |
567 @param cond expression of the watch expression (string) |
588 @param cond expression of the watch expression (string) |
568 @param count number of occurrences to ignore (int) |
589 @param count number of occurrences to ignore (int) |
569 """ |
590 """ |
570 # cond is combination of cond and special (s. watch expression viewer) |
591 # cond is combination of cond and special (s. watch expression viewer) |
612 @param filter list of variable types to filter out (list of int) |
633 @param filter list of variable types to filter out (list of int) |
613 @param var list encoded name of variable to retrieve (string) |
634 @param var list encoded name of variable to retrieve (string) |
614 @param framenr framenumber of the variables to retrieve (int) |
635 @param framenr framenumber of the variables to retrieve (int) |
615 """ |
636 """ |
616 self.__sendCommand('{0}{1}, {2:d}, {3:d}, {4}\n'.format( |
637 self.__sendCommand('{0}{1}, {2:d}, {3:d}, {4}\n'.format( |
617 DebugProtocol.RequestVariable, str(var), framenr, scope, str(filter))) |
638 DebugProtocol.RequestVariable, str(var), framenr, scope, |
|
639 str(filter))) |
618 |
640 |
619 def remoteClientSetFilter(self, scope, filter): |
641 def remoteClientSetFilter(self, scope, filter): |
620 """ |
642 """ |
621 Public method to set a variables filter list. |
643 Public method to set a variables filter list. |
622 |
644 |
667 Public slot to get the a list of possible commandline completions |
691 Public slot to get the a list of possible commandline completions |
668 from the remote client. |
692 from the remote client. |
669 |
693 |
670 @param text the text to be completed (string) |
694 @param text the text to be completed (string) |
671 """ |
695 """ |
672 self.__sendCommand("{0}{1}\n".format(DebugProtocol.RequestCompletion, text)) |
696 self.__sendCommand("{0}{1}\n".format( |
|
697 DebugProtocol.RequestCompletion, text)) |
673 |
698 |
674 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase): |
699 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase): |
675 """ |
700 """ |
676 Public method to prepare a new unittest run. |
701 Public method to prepare a new unittest run. |
677 |
702 |
678 @param fn the filename to load (string) |
703 @param fn the filename to load (string) |
679 @param tn the testname to load (string) |
704 @param tn the testname to load (string) |
680 @param tfn the test function name to load tests from (string) |
705 @param tfn the test function name to load tests from (string) |
681 @param failed list of failed test, if only failed test should be run |
706 @param failed list of failed test, if only failed test should be run |
682 (list of strings) |
707 (list of strings) |
683 @param cov flag indicating collection of coverage data is requested (boolean) |
708 @param cov flag indicating collection of coverage data is requested |
|
709 (boolean) |
684 @param covname filename to be used to assemble the coverage caches |
710 @param covname filename to be used to assemble the coverage caches |
685 filename (string) |
711 filename (string) |
686 @param coverase flag indicating erasure of coverage data is requested (boolean) |
712 @param coverase flag indicating erasure of coverage data is requested |
|
713 (boolean) |
687 @exception NotImplementedError raised to indicate that this interface |
714 @exception NotImplementedError raised to indicate that this interface |
688 is not supported |
715 is not supported |
689 """ |
716 """ |
690 raise NotImplementedError("Interface not available.") |
717 raise NotImplementedError("Interface not available.") |
691 |
718 |