# eric4.Debugger.DebugViewer

Module implementing a widget containing various debug related views.

The views avaliable are:

- variables viewer for global variables
- variables viewer for local variables
- viewer for breakpoints
- viewer for watch expressions
- viewer for exceptions
- viewer for threads
- a file browser (optional)
- an interpreter shell (optional)

### Global Attributes

None

### Classes

DebugViewer | Class implementing a widget conatining various debug related views.

### Functions

None

## DebugViewer

Class implementing a widget conatining various debug related views.

The individual tabs contain the interpreter shell (optional), the filesystem browser (optional), the two variables viewers (global and local), a breakpoint viewer, a watch expression viewer and the exception logger. Additionally a list of all threads is shown.

### Signals

sourceFile(string, int)
  emitted to open a source file at a line

### Derived from

QWidget

### Class Attributes

None

### Class Methods

None

### Methods

DebugViewer | Constructor
__frameSelected | Private slot to handle the selection of a new stack frame number.
__setGlobalsFilter | Private slot to set the global variable filter
__setLocalsFilter | Private slot to set the local variable filter
__showSource | Private slot to handle the source button press to show the selected file.
__threadSelected | Private slot to handle the selection of a thread in the thread list.
currentWidget | Public method to get a reference to the current widget.
handleClientStack | Public slot to show the call stack of the program being debugged.
handleDebuggingStarted | Public slot to handle the start of a debugging session.
handleRawInput | Pulic slot to handle the switch to the shell in raw input mode.
handleResetUI | Public method to reset the SBVviewer.
restoreCurrentPage | Public slot to restore the previously saved page.
saveCurrentPage | Public slot to save the current page.
setCurrentWidget | Public slot to set the current page based on the given widget.
setDebugger | Public method to set a reference to the Debug UI.
setVariablesFilter | Public slot to set the local variables filter.
showThreadList | Public method to show the thread list.
showVariable | Public method to show the variables in the respective window.
showVariables | Public method to show the variables in the respective window.
showVariablesTab | Public method to make a variables tab visible.

### Static Methods

None

#### DebugViewer (Constructor)

DebugViewer(debugServer, docked, vm, parent = None, embeddedShell = True, embeddedBrowser = True)

Constructor

debugServer
  reference to the debug server object
docked
  flag indicating a dock window
vm
  reference to the viewmanager object
parent
  parent widget (QWidget)
embeddedShell
  flag indicating whether the shell should be included. This flag is set to False by those layouts, that have the interpreter shell in a separate window.
embeddedBrowser
  flag indicating whether the file browser should be included. This flag is set to False by those layouts, that have the file browser in a separate window or embedded in the project browser instead.

#### DebugViewer.__frameSelected

__frameSelected(frmnr)

Private slot to handle the selection of a new stack frame number.

frmnr
  frame number (0 is the current frame) (int)

#### DebugViewer.__setGlobalsFilter

__setGlobalsFilter()

Private slot to set the global variable filter

#### DebugViewer.__setLocalsFilter

__setLocalsFilter()

Private slot to set the local variable filter

#### DebugViewer.__showSource

__showSource()

Private slot to handle the source button press to show the selected file.

#### DebugViewer.__threadSelected

__threadSelected(current, previous)

Private slot to handle the selection of a thread in the thread list.

current
  reference to the new current item (QTreeWidgetItem)
previous
  reference to the previous current item (QTreeWidgetItem)

#### DebugViewer.currentWidget

currentWidget()

Public method to get a reference to the current widget.

Returns:
  reference to the current widget (QWidget)

#### DebugViewer.handleClientStack

handleClientStack(stack)

Public slot to show the call stack of the program being debugged.

#### DebugViewer.handleDebuggingStarted

handleDebuggingStarted()

Public slot to handle the start of a debugging session.

This slot sets the variables filter expressions.

#### DebugViewer.handleRawInput

handleRawInput()

Pulic slot to handle the switch to the shell in raw input mode.

#### DebugViewer.handleResetUI

handleResetUI()

Public method to reset the SBVviewer.

#### DebugViewer.restoreCurrentPage

restoreCurrentPage()

Public slot to restore the previously saved page.

#### DebugViewer.saveCurrentPage

saveCurrentPage()

Public slot to save the current page.

#### DebugViewer.setCurrentWidget

setCurrentWidget(widget)

Public slot to set the current page based on the given widget.

widget
  reference to the widget (QWidget)

#### DebugViewer.setDebugger

setDebugger(debugUI)

Public method to set a reference to the Debug UI.

debugUI
  reference to the DebugUI objectTrees

#### DebugViewer.setVariablesFilter

setVariablesFilter(globalsFilter, localsFilter)

Public slot to set the local variables filter.

globalsFilter
  filter list for global variable types (list of int)
localsFilter
  filter list for local variable types (list of int)

#### DebugViewer.showThreadList

showThreadList(currentID, threadList)

Public method to show the thread list.

currentID
  id of the current thread (integer)
threadList
  list of dictionaries containing the thread data

#### DebugViewer.showVariable

showVariable(vlist, globals)

Public method to show the variables in the respective window.

vlist
  list of variables to display
globals
  flag indicating global/local state

#### DebugViewer.showVariables

showVariables(vlist, globals)

Public method to show the variables in the respective window.

vlist
  list of variables to display
globals
  flag indicating global/local state

#### DebugViewer.showVariablesTab

showVariablesTab(globals)

Public method to make a variables tab visible.

globals
  flag indicating global/local state

Up