eric6/Debugger/DebugUI.py

changeset 7862
817ef8e0fa66
parent 7857
5cbae4f7e35a
child 7863
6725d2549801
equal deleted inserted replaced
7861:3d48094ba8e1 7862:817ef8e0fa66
113 self.lastAction = -1 113 self.lastAction = -1
114 self.debugActions = [ 114 self.debugActions = [
115 self.__continue, self.__step, self.__stepOver, self.__stepOut, 115 self.__continue, self.__step, self.__stepOver, self.__stepOut,
116 self.__stepQuit, self.__runToCursor, self.__moveInstructionPointer 116 self.__stepQuit, self.__runToCursor, self.__moveInstructionPointer
117 ] 117 ]
118 self.localsVarFilter, self.globalsVarFilter = ( 118 self.__localsVarFilterList, self.__globalsVarFilterList = (
119 Preferences.getVarFilters()) 119 Preferences.getVarFilters())
120 self.debugViewer.setVariablesFilter( 120 self.debugViewer.setVariablesFilter(
121 self.globalsVarFilter, self.localsVarFilter) 121 self.__globalsVarFilterList, self.__localsVarFilterList)
122 122
123 # Connect the signals emitted by the debug-server 123 # Connect the signals emitted by the debug-server
124 debugServer.clientGone.connect(self.__clientGone) 124 debugServer.clientGone.connect(self.__clientGone)
125 debugServer.clientLine.connect(self.__clientLine) 125 debugServer.clientLine.connect(self.__clientLine)
126 debugServer.clientExit.connect(self.__clientExit) 126 debugServer.clientExit.connect(self.__clientExit)
156 def variablesFilter(self, scope): 156 def variablesFilter(self, scope):
157 """ 157 """
158 Public method to get the variables filter for a scope. 158 Public method to get the variables filter for a scope.
159 159
160 @param scope flag indicating global (True) or local (False) scope 160 @param scope flag indicating global (True) or local (False) scope
161 @return filters list (list of integers) 161 @return filters list
162 @rtype list of str
162 """ 163 """
163 if scope: 164 if scope:
164 return self.globalsVarFilter[:] 165 return self.__globalsVarFilterList[:]
165 else: 166 else:
166 return self.localsVarFilter[:] 167 return self.__localsVarFilterList[:]
167 168
168 def initActions(self): 169 def initActions(self):
169 """ 170 """
170 Public method defining the user interface actions. 171 Public method defining the user interface actions.
171 """ 172 """
1280 1281
1281 def __clientThreadSet(self): 1282 def __clientThreadSet(self):
1282 """ 1283 """
1283 Private method to handle a change of the client's current thread. 1284 Private method to handle a change of the client's current thread.
1284 """ 1285 """
1285 self.debugServer.remoteClientVariables(0, self.localsVarFilter) 1286 self.debugServer.remoteClientVariables(0, self.__localsVarFilterList)
1286 1287
1287 def __getClientVariables(self): 1288 def __getClientVariables(self):
1288 """ 1289 """
1289 Private method to request the global and local variables. 1290 Private method to request the global and local variables.
1290 1291
1291 In the first step, the global variables are requested from the client. 1292 In the first step, the global variables are requested from the client.
1292 Once these have been received, the local variables are requested. 1293 Once these have been received, the local variables are requested.
1293 This happens in the method '__clientVariables'. 1294 This happens in the method '__clientVariables'.
1294 """ 1295 """
1295 # get globals first 1296 # get globals first
1296 self.debugServer.remoteClientVariables(1, self.globalsVarFilter) 1297 self.debugServer.remoteClientVariables(1, self.__globalsVarFilterList)
1297 # the local variables are requested once we have received the globals 1298 # the local variables are requested once we have received the globals
1298 1299
1299 def __clientVariables(self, scope, variables): 1300 def __clientVariables(self, scope, variables):
1300 """ 1301 """
1301 Private method to write the clients variables to the user interface. 1302 Private method to write the clients variables to the user interface.
1307 self.ui.activateDebugViewer() 1308 self.ui.activateDebugViewer()
1308 if scope > 0: 1309 if scope > 0:
1309 self.debugViewer.showVariables(variables, True) 1310 self.debugViewer.showVariables(variables, True)
1310 if scope == 1: 1311 if scope == 1:
1311 # now get the local variables 1312 # now get the local variables
1312 self.debugServer.remoteClientVariables(0, self.localsVarFilter) 1313 self.debugServer.remoteClientVariables(
1314 0, self.__localsVarFilterList)
1313 elif scope == 0: 1315 elif scope == 0:
1314 self.debugViewer.showVariables(variables, False) 1316 self.debugViewer.showVariables(variables, False)
1315 elif scope == -1: 1317 elif scope == -1:
1316 vlist = [(self.tr('No locals available.'), '', '')] 1318 vlist = [(self.tr('No locals available.'), '', '')]
1317 self.debugViewer.showVariables(vlist, False) 1319 self.debugViewer.showVariables(vlist, False)
1433 """ 1435 """
1434 Private slot for displaying the variables filter configuration dialog. 1436 Private slot for displaying the variables filter configuration dialog.
1435 """ 1437 """
1436 from .VariablesFilterDialog import VariablesFilterDialog 1438 from .VariablesFilterDialog import VariablesFilterDialog
1437 dlg = VariablesFilterDialog(self.ui, 'Filter Dialog', True) 1439 dlg = VariablesFilterDialog(self.ui, 'Filter Dialog', True)
1438 dlg.setSelection(self.localsVarFilter, self.globalsVarFilter) 1440 dlg.setSelection(self.__localsVarFilterList,
1441 self.__globalsVarFilterList)
1439 if dlg.exec() == QDialog.Accepted: 1442 if dlg.exec() == QDialog.Accepted:
1440 self.localsVarFilter, self.globalsVarFilter = dlg.getSelection() 1443 self.__localsVarFilterList, self.__globalsVarFilterList = (
1444 dlg.getSelection()
1445 )
1441 self.debugViewer.setVariablesFilter( 1446 self.debugViewer.setVariablesFilter(
1442 self.globalsVarFilter, self.localsVarFilter) 1447 self.__globalsVarFilterList, self.__localsVarFilterList)
1443 1448
1444 def __configureExceptionsFilter(self): 1449 def __configureExceptionsFilter(self):
1445 """ 1450 """
1446 Private slot for displaying the exception filter dialog. 1451 Private slot for displaying the exception filter dialog.
1447 """ 1452 """

eric ide

mercurial