src/eric7/Debugger/DebugUI.py

branch
eric7
changeset 9541
69167c94995f
parent 9517
d73c3a1e432b
child 9573
9960d19d66b5
equal deleted inserted replaced
9540:6bc76f2c80aa 9541:69167c94995f
1586 1586
1587 @param debuggerId ID of the debugger backend 1587 @param debuggerId ID of the debugger backend
1588 @type str 1588 @type str
1589 """ 1589 """
1590 if self.debugServer.isDebugging(): 1590 if self.debugServer.isDebugging():
1591 self.debugServer.remoteClientVariables( 1591 self.__getClientVariables(debuggerId)
1592 debuggerId, 0, self.__localsVarFilterList
1593 )
1594 1592
1595 def __getClientVariables(self, debuggerId): 1593 def __getClientVariables(self, debuggerId):
1596 """ 1594 """
1597 Private method to request the global and local variables. 1595 Private method to request the global and local variables.
1598 1596
1605 """ 1603 """
1606 # get globals first 1604 # get globals first
1607 self.debugServer.remoteClientVariables( 1605 self.debugServer.remoteClientVariables(
1608 debuggerId, 1, self.__globalsVarFilterList 1606 debuggerId, 1, self.__globalsVarFilterList
1609 ) 1607 )
1610 # the local variables are requested once we have received the globals 1608 # get locals second
1609 self.debugServer.remoteClientVariables(
1610 debuggerId, 0, self.__localsVarFilterList
1611 )
1611 1612
1612 def __clientVariables(self, scope, variables, debuggerId): 1613 def __clientVariables(self, scope, variables, debuggerId):
1613 """ 1614 """
1614 Private method to write the clients variables to the user interface. 1615 Private method to write the clients variables to the user interface.
1615 1616
1623 """ 1624 """
1624 if debuggerId == self.getSelectedDebuggerId() and scope > -2: 1625 if debuggerId == self.getSelectedDebuggerId() and scope > -2:
1625 self.ui.activateDebugViewer() 1626 self.ui.activateDebugViewer()
1626 if scope > 0: 1627 if scope > 0:
1627 self.debugViewer.showVariables(variables, True) 1628 self.debugViewer.showVariables(variables, True)
1628 if scope == 1:
1629 # now get the local variables
1630 self.debugServer.remoteClientVariables(
1631 self.getSelectedDebuggerId(), 0, self.__localsVarFilterList
1632 )
1633 elif scope == 0: 1629 elif scope == 0:
1634 self.debugViewer.showVariables(variables, False) 1630 self.debugViewer.showVariables(variables, False)
1635 elif scope == -1: 1631 elif scope == -1:
1636 vlist = [(self.tr("No locals available."), "", "", False, -2, "")] 1632 vlist = [(self.tr("No locals available."), "", "", False, -2, "")]
1637 self.debugViewer.showVariables(vlist, False) 1633 self.debugViewer.showVariables(vlist, False)

eric ide

mercurial