120 self.lastAction = -1 |
120 self.lastAction = -1 |
121 self.debugActions = [ |
121 self.debugActions = [ |
122 self.__continue, self.__step, self.__stepOver, self.__stepOut, |
122 self.__continue, self.__step, self.__stepOver, self.__stepOut, |
123 self.__stepQuit, self.__runToCursor, self.__moveInstructionPointer |
123 self.__stepQuit, self.__runToCursor, self.__moveInstructionPointer |
124 ] |
124 ] |
125 self.localsVarFilter, self.globalsVarFilter = ( |
125 self.__localsVarFilterList, self.__globalsVarFilterList = ( |
126 Preferences.getVarFilters()) |
126 Preferences.getVarFilters()) |
127 self.debugViewer.setVariablesFilter( |
127 self.debugViewer.setVariablesFilter( |
128 self.globalsVarFilter, self.localsVarFilter) |
128 self.__globalsVarFilterList, self.__localsVarFilterList) |
129 |
129 |
130 # Connect the signals emitted by the debug-server |
130 # Connect the signals emitted by the debug-server |
131 debugServer.clientGone.connect(self.__clientGone) |
131 debugServer.clientGone.connect(self.__clientGone) |
132 debugServer.clientLine.connect(self.__clientLine) |
132 debugServer.clientLine.connect(self.__clientLine) |
133 debugServer.clientExit.connect(self.__clientExit) |
133 debugServer.clientExit.connect(self.__clientExit) |
162 def variablesFilter(self, scope): |
162 def variablesFilter(self, scope): |
163 """ |
163 """ |
164 Public method to get the variables filter for a scope. |
164 Public method to get the variables filter for a scope. |
165 |
165 |
166 @param scope flag indicating global (True) or local (False) scope |
166 @param scope flag indicating global (True) or local (False) scope |
167 @return filters list (list of integers) |
167 @return filters list |
|
168 @rtype list of str |
168 """ |
169 """ |
169 if scope: |
170 if scope: |
170 return self.globalsVarFilter[:] |
171 return self.__globalsVarFilterList[:] |
171 else: |
172 else: |
172 return self.localsVarFilter[:] |
173 return self.__localsVarFilterList[:] |
173 |
174 |
174 def initActions(self): |
175 def initActions(self): |
175 """ |
176 """ |
176 Public method defining the user interface actions. |
177 Public method defining the user interface actions. |
177 """ |
178 """ |
1323 |
1324 |
1324 @param debuggerId ID of the debugger backend |
1325 @param debuggerId ID of the debugger backend |
1325 @type str |
1326 @type str |
1326 """ |
1327 """ |
1327 self.debugServer.remoteClientVariables( |
1328 self.debugServer.remoteClientVariables( |
1328 debuggerId, 0, self.localsVarFilter) |
1329 debuggerId, 0, self.__localsVarFilterList) |
1329 |
1330 |
1330 def __getClientVariables(self, debuggerId): |
1331 def __getClientVariables(self, debuggerId): |
1331 """ |
1332 """ |
1332 Private method to request the global and local variables. |
1333 Private method to request the global and local variables. |
1333 |
1334 |
1334 In the first step, the global variables are requested from the client. |
1335 In the first step, the global variables are requested from the client. |
1338 @param debuggerId ID of the debugger backend |
1339 @param debuggerId ID of the debugger backend |
1339 @type str |
1340 @type str |
1340 """ |
1341 """ |
1341 # get globals first |
1342 # get globals first |
1342 self.debugServer.remoteClientVariables( |
1343 self.debugServer.remoteClientVariables( |
1343 debuggerId, 1, self.globalsVarFilter) |
1344 debuggerId, 1, self.__globalsVarFilterList) |
1344 # the local variables are requested once we have received the globals |
1345 # the local variables are requested once we have received the globals |
1345 |
1346 |
1346 def __clientVariables(self, scope, variables, debuggerId): |
1347 def __clientVariables(self, scope, variables, debuggerId): |
1347 """ |
1348 """ |
1348 Private method to write the clients variables to the user interface. |
1349 Private method to write the clients variables to the user interface. |
1361 self.debugViewer.showVariables(variables, True) |
1362 self.debugViewer.showVariables(variables, True) |
1362 if scope == 1: |
1363 if scope == 1: |
1363 # now get the local variables |
1364 # now get the local variables |
1364 self.debugServer.remoteClientVariables( |
1365 self.debugServer.remoteClientVariables( |
1365 self.getSelectedDebuggerId(), |
1366 self.getSelectedDebuggerId(), |
1366 0, self.localsVarFilter) |
1367 0, self.__localsVarFilterList) |
1367 elif scope == 0: |
1368 elif scope == 0: |
1368 self.debugViewer.showVariables(variables, False) |
1369 self.debugViewer.showVariables(variables, False) |
1369 elif scope == -1: |
1370 elif scope == -1: |
1370 vlist = [(self.tr('No locals available.'), '', '')] |
1371 vlist = [(self.tr('No locals available.'), '', '')] |
1371 self.debugViewer.showVariables(vlist, False) |
1372 self.debugViewer.showVariables(vlist, False) |
1502 """ |
1503 """ |
1503 Private slot for displaying the variables filter configuration dialog. |
1504 Private slot for displaying the variables filter configuration dialog. |
1504 """ |
1505 """ |
1505 from .VariablesFilterDialog import VariablesFilterDialog |
1506 from .VariablesFilterDialog import VariablesFilterDialog |
1506 dlg = VariablesFilterDialog(self.ui, 'Filter Dialog', True) |
1507 dlg = VariablesFilterDialog(self.ui, 'Filter Dialog', True) |
1507 dlg.setSelection(self.localsVarFilter, self.globalsVarFilter) |
1508 dlg.setSelection(self.__localsVarFilterList, |
|
1509 self.__globalsVarFilterList) |
1508 if dlg.exec() == QDialog.Accepted: |
1510 if dlg.exec() == QDialog.Accepted: |
1509 self.localsVarFilter, self.globalsVarFilter = dlg.getSelection() |
1511 self.__localsVarFilterList, self.__globalsVarFilterList = ( |
|
1512 dlg.getSelection() |
|
1513 ) |
1510 self.debugViewer.setVariablesFilter( |
1514 self.debugViewer.setVariablesFilter( |
1511 self.globalsVarFilter, self.localsVarFilter) |
1515 self.__globalsVarFilterList, self.__localsVarFilterList) |
1512 |
1516 |
1513 def __configureExceptionsFilter(self): |
1517 def __configureExceptionsFilter(self): |
1514 """ |
1518 """ |
1515 Private slot for displaying the exception filter dialog. |
1519 Private slot for displaying the exception filter dialog. |
1516 """ |
1520 """ |