eric6/Debugger/DebugUI.py

changeset 8349
b43cf23955aa
parent 8265
0090cfa83159
child 8380
73ef1edca602
equal deleted inserted replaced
8329:c823968b9602 8349:b43cf23955aa
1370 Private method to handle a change of the client's current thread. 1370 Private method to handle a change of the client's current thread.
1371 1371
1372 @param debuggerId ID of the debugger backend 1372 @param debuggerId ID of the debugger backend
1373 @type str 1373 @type str
1374 """ 1374 """
1375 self.debugServer.remoteClientVariables( 1375 if self.debugServer.isDebugging():
1376 debuggerId, 0, self.__localsVarFilterList) 1376 self.debugServer.remoteClientVariables(
1377 debuggerId, 0, self.__localsVarFilterList)
1377 1378
1378 def __getClientVariables(self, debuggerId): 1379 def __getClientVariables(self, debuggerId):
1379 """ 1380 """
1380 Private method to request the global and local variables. 1381 Private method to request the global and local variables.
1381 1382
1393 1394
1394 def __clientVariables(self, scope, variables, debuggerId): 1395 def __clientVariables(self, scope, variables, debuggerId):
1395 """ 1396 """
1396 Private method to write the clients variables to the user interface. 1397 Private method to write the clients variables to the user interface.
1397 1398
1398 @param scope scope of the variables (-1 = empty locals, 1 = global, 1399 @param scope scope of the variables
1399 0 = local) 1400 (-2 = no frame found, -1 = empty locals, 1 = global, 0 = local)
1400 @type int 1401 @type int
1401 @param variables the list of variables from the client 1402 @param variables the list of variables from the client
1402 @type list 1403 @type list
1403 @param debuggerId ID of the debugger backend 1404 @param debuggerId ID of the debugger backend
1404 @type str 1405 @type str
1405 """ 1406 """
1406 if debuggerId == self.getSelectedDebuggerId(): 1407 if debuggerId == self.getSelectedDebuggerId():
1407 self.ui.activateDebugViewer() 1408 if scope > -2:
1408 if scope > 0: 1409 self.ui.activateDebugViewer()
1409 self.debugViewer.showVariables(variables, True) 1410 if scope > 0:
1410 if scope == 1: 1411 self.debugViewer.showVariables(variables, True)
1411 # now get the local variables 1412 if scope == 1:
1412 self.debugServer.remoteClientVariables( 1413 # now get the local variables
1413 self.getSelectedDebuggerId(), 1414 self.debugServer.remoteClientVariables(
1414 0, self.__localsVarFilterList) 1415 self.getSelectedDebuggerId(),
1415 elif scope == 0: 1416 0, self.__localsVarFilterList)
1416 self.debugViewer.showVariables(variables, False) 1417 elif scope == 0:
1417 elif scope == -1: 1418 self.debugViewer.showVariables(variables, False)
1418 vlist = [(self.tr('No locals available.'), '', '')] 1419 elif scope == -1:
1419 self.debugViewer.showVariables(vlist, False) 1420 vlist = [(self.tr('No locals available.'), '', '')]
1421 self.debugViewer.showVariables(vlist, False)
1420 1422
1421 def __clientVariable(self, scope, variables, debuggerId): 1423 def __clientVariable(self, scope, variables, debuggerId):
1422 """ 1424 """
1423 Private method to write the contents of a clients classvariable to 1425 Private method to write the contents of a clients classvariable to
1424 the user interface. 1426 the user interface.

eric ide

mercurial