# eric7.Debugger.CallStackViewer

Module implementing the Call Stack viewer widget.

### Global Attributes

None

### Classes

CallStackViewer | Class implementing the Call Stack viewer widget.

### Functions

None

## CallStackViewer

Class implementing the Call Stack viewer widget.

### Signals

frameSelected(int)
  emitted to signal the selection of a frame entry
sourceFile(str, int)
  emitted to show the source of a stack entry

### Derived from

QWidget

### Class Attributes

FilenameRole
LinenoRole

### Class Methods

None

### Methods

CallStackViewer | Constructor
__itemDoubleClicked | Private slot to handle a double click of a stack entry.
__openSource | Private slot to show the source for the selected stack entry.
__saveStackTrace | Private slot to save the stack trace info to a file.
__showCallStack | Private slot to show the call stack of the program being debugged.
__showContextMenu | Private slot to show the context menu.
clear | Public method to clear the stack viewer data.
setDebugger | Public method to set a reference to the Debug UI.
setProjectMode | Public slot to set the call trace viewer to project mode.

### Static Methods

None

#### CallStackViewer (Constructor)

CallStackViewer(debugServer, parent=None)

Constructor

debugServer (DebugServer)
  reference to the debug server object
parent (QWidget)
  reference to the parent widget

#### CallStackViewer.__itemDoubleClicked

__itemDoubleClicked(itm)

Private slot to handle a double click of a stack entry.

itm (QTreeWidgetItem)
  reference to the double clicked item

#### CallStackViewer.__openSource

__openSource()

Private slot to show the source for the selected stack entry.

#### CallStackViewer.__saveStackTrace

__saveStackTrace()

Private slot to save the stack trace info to a file.

#### CallStackViewer.__showCallStack

__showCallStack(stack, debuggerId)

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

stack (list of tuples of (str, str, str, str))
  list of tuples with call stack data (file name, line number, function name, formatted argument/values list)
debuggerId (str)
  ID of the debugger backend

#### CallStackViewer.__showContextMenu

__showContextMenu(coord)

Private slot to show the context menu.

coord (QPoint)
  the position of the mouse pointer

#### CallStackViewer.clear

clear()

Public method to clear the stack viewer data.

#### CallStackViewer.setDebugger

setDebugger(debugUI)

Public method to set a reference to the Debug UI.

debugUI (DebugUI)
  reference to the DebugUI object

#### CallStackViewer.setProjectMode

setProjectMode(enabled)

Public slot to set the call trace viewer to project mode.

In project mode the call trace info is shown with project relative path names.

enabled (bool)
  flag indicating to enable the project mode

Up