src/eric7/Debugger/VariablesViewer.py

branch
eric7
changeset 9397
a415cb83dafb
parent 9221
bf71ee032bb4
child 9413
80c06d472826
equal deleted inserted replaced
9396:06699e5600a3 9397:a415cb83dafb
273 def showVariables(self, vlist, frmnr, pathlist=None): 273 def showVariables(self, vlist, frmnr, pathlist=None):
274 """ 274 """
275 Public method to update the data model of variable in pathlist. 275 Public method to update the data model of variable in pathlist.
276 276
277 @param vlist the list of variables to be displayed. Each 277 @param vlist the list of variables to be displayed. Each
278 list entry is a tuple of three values. 278 list entry is a tuple of six values.
279 <ul> 279 <ul>
280 <li>the variable name (string)</li> 280 <li>the variable name (str)</li>
281 <li>the variables type (string)</li> 281 <li>list, tuple, dict or set indicator (str)</li>
282 <li>the variables value (string)</li> 282 <li>the variables type (str)</li>
283 <li>a flag indicating the presence of children (bool)</li>
284 <li>the length of the array or string (int)</li>
285 <li>the variables value (str)</li>
283 </ul> 286 </ul>
284 @type list of str 287 @type list of str
285 @param frmnr frame number (0 is the current frame) 288 @param frmnr frame number (0 is the current frame)
286 @type int 289 @type int
287 @param pathlist full path to the variable 290 @param pathlist full path to the variable
730 variablesFilter = ( 733 variablesFilter = (
731 ericApp().getObject("DebugUI").variablesFilter(self.__globalScope) 734 ericApp().getObject("DebugUI").variablesFilter(self.__globalScope)
732 ) 735 )
733 ericApp().getObject("DebugServer").remoteClientVariable( 736 ericApp().getObject("DebugServer").remoteClientVariable(
734 ericApp().getObject("DebugUI").getSelectedDebuggerId(), 737 ericApp().getObject("DebugUI").getSelectedDebuggerId(),
735 self.__globalScope, 738 1 if self.__globalScope else 0,
736 variablesFilter, 739 variablesFilter,
737 pathlist, 740 pathlist,
738 self.framenr, 741 self.framenr,
739 ) 742 )
740 743
940 def showVariables(self, vlist, frmnr): 943 def showVariables(self, vlist, frmnr):
941 """ 944 """
942 Public method to show variables in a list. 945 Public method to show variables in a list.
943 946
944 @param vlist the list of variables to be displayed. Each 947 @param vlist the list of variables to be displayed. Each
945 list entry is a tuple of three values. 948 list entry is a tuple of six values.
946 <ul> 949 <ul>
947 <li>the variable name (string)</li> 950 <li>the variable name (str)</li>
948 <li>the variables type (string)</li> 951 <li>list, tuple, dict or set indicator (str)</li>
949 <li>the variables value (string)</li> 952 <li>the variables type (str)</li>
953 <li>a flag indicating the presence of children (bool)</li>
954 <li>the length of the array or string (int)</li>
955 <li>the variables value (str)</li>
950 </ul> 956 </ul>
951 @type list 957 @type list
952 @param frmnr frame number (0 is the current frame) 958 @param frmnr frame number (0 is the current frame)
953 @type int 959 @type int
954 """ 960 """
960 Public method to show variables in a list. 966 Public method to show variables in a list.
961 967
962 @param vlist the list of subitems to be displayed. 968 @param vlist the list of subitems to be displayed.
963 The first element gives the path of the 969 The first element gives the path of the
964 parent variable. Each other list entry is 970 parent variable. Each other list entry is
965 a tuple of three values. 971 a tuple of six values.
966 <ul> 972 <ul>
967 <li>the variable name (string)</li> 973 <li>the variable name (str)</li>
968 <li>the variables type (string)</li> 974 <li>list, tuple, dict or set indicator (str)</li>
969 <li>the variables value (string)</li> 975 <li>the variables type (str)</li>
976 <li>a flag indicating the presence of children (bool)</li>
977 <li>the length of the array or string (int)</li>
978 <li>the variables value (str)</li>
970 </ul> 979 </ul>
971 @type list 980 @type list
972 """ 981 """
973 self.varModel.showVariables(vlist[1:], 0, vlist[0]) 982 self.varModel.showVariables(vlist[1:], 0, vlist[0])
974 983
1157 """ 1166 """
1158 Private method to open the variables filter dialog. 1167 Private method to open the variables filter dialog.
1159 """ 1168 """
1160 ericApp().getObject("DebugUI").dbgFilterAct.triggered.emit() 1169 ericApp().getObject("DebugUI").dbgFilterAct.triggered.emit()
1161 1170
1171 def clear(self):
1172 """
1173 Public method to clear the viewer.
1174 """
1175 self.varModel.clear()
1176
1162 1177
1163 # 1178 #
1164 # eflag: noqa = M822 1179 # eflag: noqa = M822

eric ide

mercurial