eric6/Debugger/DebugViewer.py

branch
multi_processing
changeset 7411
6d8dcb3551b3
parent 7410
401791e6f50f
child 7412
0a995393d2ba
equal deleted inserted replaced
7410:401791e6f50f 7411:6d8dcb3551b3
450 @param quiet flag indicating to suppress exit info display 450 @param quiet flag indicating to suppress exit info display
451 @type bool 451 @type bool
452 @param debuggerId ID of the debugger backend 452 @param debuggerId ID of the debugger backend
453 @type str 453 @type str
454 """ 454 """
455 self.__setDebuggerIconAndState(debuggerId, "exit", "exited")
456 if debuggerId == self.getSelectedDebuggerId(): 455 if debuggerId == self.getSelectedDebuggerId():
457 # the current client has exited 456 # the current client has exited
458 self.globalsViewer.handleResetUI() 457 self.globalsViewer.handleResetUI()
459 self.localsViewer.handleResetUI() 458 self.localsViewer.handleResetUI()
460 self.setGlobalsFilter() 459 self.setGlobalsFilter()
461 self.setLocalsFilter() 460 self.setLocalsFilter()
462 self.sourceButton.setEnabled(False) 461 self.sourceButton.setEnabled(False)
463 self.currentStack = None 462 self.currentStack = None
464 self.stackComboBox.clear() 463 self.stackComboBox.clear()
465 self.__threadList.clear() 464 self.__threadList.clear()
465 index = self.__debuggersCombo.findText(debuggerId, Qt.MatchExactly)
466 self.__debuggersCombo.removeItem(index)
466 467
467 def __clientSyntaxError(self, message, filename, lineNo, characterNo, 468 def __clientSyntaxError(self, message, filename, lineNo, characterNo,
468 debuggerId): 469 debuggerId):
469 """ 470 """
470 Private method to handle a syntax error in the debugged program. 471 Private method to handle a syntax error in the debugged program.
635 if thread.get('except', False): 636 if thread.get('except', False):
636 debugStatus = 1 637 debugStatus = 1
637 elif thread['broken']: 638 elif thread['broken']:
638 if debugStatus < 1: 639 if debugStatus < 1:
639 debugStatus = 0 640 debugStatus = 0
640 if not threadList:
641 # empty threadlist means 'exited'
642 debugStatus = 2
643 641
644 if debugStatus == -1: 642 if debugStatus == -1:
645 icon = "mediaPlaybackStart" 643 icon = "mediaPlaybackStart"
646 state = "running" 644 state = "running"
647 elif debugStatus == 0: 645 elif debugStatus == 0:
648 icon = "break" 646 icon = "break"
649 state = "broken" 647 state = "broken"
650 elif debugStatus == 1: 648 else:
651 icon = "exceptions" 649 icon = "exceptions"
652 state = "exception" 650 state = "exception"
653 else:
654 icon = "exit"
655 state = "exited"
656 self.__setDebuggerIconAndState("", icon, state) 651 self.__setDebuggerIconAndState("", icon, state)
657 652
658 def __threadSelected(self, current, previous): 653 def __threadSelected(self, current, previous):
659 """ 654 """
660 Private slot to handle the selection of a thread in the thread list. 655 Private slot to handle the selection of a thread in the thread list.
727 722
728 def getSelectedDebuggerState(self): 723 def getSelectedDebuggerState(self):
729 """ 724 """
730 Public method to get the currently selected debugger's state. 725 Public method to get the currently selected debugger's state.
731 726
732 @return selected debugger's state (broken, exception, exited, running) 727 @return selected debugger's state (broken, exception, running)
733 @rtype str 728 @rtype str
734 """ 729 """
735 return self.__debuggersCombo.currentData() 730 return self.__debuggersCombo.currentData()
736 731
737 def __setDebuggerIconAndState(self, debuggerId, iconName, state): 732 def __setDebuggerIconAndState(self, debuggerId, iconName, state):
741 @param debuggerId ID of the debugger backend (empty ID means the 736 @param debuggerId ID of the debugger backend (empty ID means the
742 currently selected one) 737 currently selected one)
743 @type str 738 @type str
744 @param iconName name of the icon to be used 739 @param iconName name of the icon to be used
745 @type str 740 @type str
746 @param state state of the debugger (broken, exception, exited, running) 741 @param state state of the debugger (broken, exception, running)
747 @type str 742 @type str
748 """ 743 """
749 if debuggerId: 744 if debuggerId:
750 index = self.__debuggersCombo.findText(debuggerId, Qt.MatchExactly) 745 index = self.__debuggersCombo.findText(debuggerId, Qt.MatchExactly)
751 else: 746 else:

eric ide

mercurial