# eric7.Debugger.DebugUI

Module implementing the debugger UI.

### Global Attributes

None

### Classes

DebugUI | Class implementing the debugger part of the UI.

### Functions

None

## DebugUI

Class implementing the debugger part of the UI.

### Signals

appendStdout(msg)
  emitted when the client program has terminated and the display of the termination dialog is suppressed
clientStack(stack, debuggerId)
  emitted at breaking after a reported exception
compileForms()
  emitted if changed project forms should be compiled
compileResources()
  emitted if changed project resources should be compiled
debuggingStarted(filename)
  emitted when a debugging session was started
exceptionInterrupt()
  emitted after the execution was interrupted by an exception and acknowledged by the user
executeMake()
  emitted if a project specific make run should be performed
resetUI(full)
  emitted to reset the UI partially or fully

### Derived from

QObject

### Class Attributes

None

### Class Methods

None

### Methods

DebugUI | Constructor
__breakpointSelected | Private method to handle the breakpoint selected signal.
__checkActions | Private slot to check some actions for their enable/disable status.
__clearBreakpoints | Private slot to handle the 'Clear breakpoints' action.
__clientBreakConditionError | Private method to handle a condition error of a breakpoint.
__clientDebuggerId | Private slot to track the list of connected debuggers.
__clientDisconnected | Private slot to handle a debug client disconnecting its control socket.
__clientException | Private method to handle an exception of the debugged program.
__clientExit | Private slot to handle the debugged program terminating.
__clientGone | Private method to handle the disconnection of the debugger client.
__clientLine | Private method to handle a change to the current line.
__clientSignal | Private method to handle a signal generated on the client side.
__clientSyntaxError | Private method to handle a syntax error in the debugged program.
__clientThreadSet | Private method to handle a change of the client's current thread.
__clientVariable | Private method to write the contents of a clients classvariable to the user interface.
__clientVariables | Private method to write the clients variables to the user interface.
__clientWatchConditionError | Private method to handle a expression error of a watch expression.
__compileChangedProjectFiles | Private method to signal compilation of changed forms and resources is wanted.
__configureExceptionsFilter | Private slot for displaying the exception filter dialog.
__configureIgnoredExceptions | Private slot for displaying the ignored exceptions dialog.
__configureVariablesFilters | Private slot for displaying the variables filter configuration dialog.
__continue | Private method to handle the Continue action.
__coverageProject | Private slot to handle the coverage of project action.
__coverageScript | Private slot to handle the coverage of script action.
__cursorChanged | Private slot handling the cursorChanged signal of the viewmanager.
__debugProject | Private slot to handle the debug project action.
__debugScript | Private slot to handle the debug script action.
__doRestart | Private slot to handle the restart action to restart the last debugged file.
__editBreakpoint | Private slot to handle the 'Edit breakpoint' action.
__editorOpened | Private slot to handle the editorOpened signal.
__enterRemote | Private method to update the user interface.
__getClientDisassembly | Private method to ask the client for the latest traceback disassembly.
__getClientVariables | Private method to request the global and local variables.
__getThreadList | Private method to get the list of threads from the client.
__lastClientExited | Private slot handling the exit of the last client.
__lastEditorClosed | Private slot to handle the closeProgram signal.
__moveInstructionPointer | Private method to move the instruction pointer to a different line.
__nextBreakpoint | Private slot to handle the 'Next breakpoint' action.
__passiveDebugStarted | Private slot to handle a passive debug session start.
__previousBreakpoint | Private slot to handle the 'Previous breakpoint' action.
__profileProject | Private slot to handle the profile project action.
__profileScript | Private slot to handle the profile script action.
__projectClosed | Private slot to handle the projectClosed signal.
__projectOpened | Private slot to handle the projectOpened signal.
__resetUI | Private slot to reset the user interface.
__runProject | Private slot to handle the run project action.
__runScript | Private slot to handle the run script action.
__runToCursor | Private method to handle the Run to Cursor action.
__runUntil | Private method to handle the Run Until action.
__showBreakpointsMenu | Private method to handle the show breakpoints menu signal.
__showDebugMenu | Private method to set up the debug menu.
__specialContinue | Private method to handle the Special Continue action.
__step | Private method to handle the Step action.
__stepOut | Private method to handle the Step Out action.
__stepOver | Private method to handle the Step Over action.
__stepQuit | Private method to handle the Step Quit action.
__stopScript | Private slot to stop the running script.
__toggleBreakpoint | Private slot to handle the 'Set/Reset breakpoint' action.
clearHistories | Public method to clear the various debug histories.
doCoverage | Public method to handle the coverage actions.
doDebug | Public method to handle the debug actions.
doProfile | Public method to handle the profile actions.
doRun | Public method to handle the run actions.
getActions | Public method to get a list of all actions.
getSelectedDebuggerId | Public method to get the currently selected debugger ID.
initActions | Public method defining the user interface actions.
initMenus | Public slot to initialize the project menu.
initToolbars | Public slot to initialize the debug toolbars.
setArgvHistory | Public slot to initialize the argv history.
setAutoClearShell | Public slot to initialize the autoClearShell flag.
setAutoContinue | Public slot to initialize the autoContinue flag.
setDebugActionsEnabled | Public method to set the enabled state of the debug actions.
setEnableGlobalConfigOverride | Public method to initialize the global config override data.
setEnableMultiprocess | Public slot to initialize the enableMultiprocess flag.
setEnvHistory | Public slot to initialize the env history.
setExcIgnoreList | Public slot to initialize the ignored exceptions type list.
setExcList | Public slot to initialize the exceptions type list.
setExceptionReporting | Public slot to initialize the exception reporting flag.
setMultiprocessNoDebugHistory | Public slot to initialize the no debug list history.
setScriptsHistory | Public slot to initialize the scripts history.
setTracePython | Public slot to initialize the trace Python flag.
setWdHistory | Public slot to initialize the wd history.
showNotification | Public method to show some notification message.
shutdown | Public method to perform shutdown actions.
shutdownServer | Public method to shut down the debug server.
variablesFilter | Public method to get the variables filter for a scope.

### Static Methods

None

#### DebugUI (Constructor)

DebugUI(ui, vm, debugServer, debugViewer, project)

Constructor

ui
  reference to the main UI
vm
  reference to the viewmanager
debugServer
  reference to the debug server
debugViewer
  reference to the debug viewer widget
project
  reference to the project object

#### DebugUI.__breakpointSelected

__breakpointSelected(act)

Private method to handle the breakpoint selected signal.

act
  reference to the action that triggered (QAction)

#### DebugUI.__checkActions

__checkActions(editor)

Private slot to check some actions for their enable/disable status.

editor
  editor window

#### DebugUI.__clearBreakpoints

__clearBreakpoints()

Private slot to handle the 'Clear breakpoints' action.

#### DebugUI.__clientBreakConditionError

__clientBreakConditionError(filename, lineno, debuggerId)

Private method to handle a condition error of a breakpoint.

filename (str)
  filename of the breakpoint
lineno (int)
  line umber of the breakpoint
debuggerId (str)
  ID of the debugger backend

#### DebugUI.__clientDebuggerId

__clientDebuggerId(debuggerId)

Private slot to track the list of connected debuggers.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__clientDisconnected

__clientDisconnected(debuggerId)

Private slot to handle a debug client disconnecting its control socket.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__clientException

__clientException(exceptionType, exceptionMessage, stackTrace, debuggerId)

Private method to handle an exception of the debugged program.

exceptionType (str)
  type of exception raised
exceptionMessage ((str)
  message given by the exception
stackTrace (list of str)
  list of stack entries
debuggerId (str)
  ID of the debugger backend

#### DebugUI.__clientExit

__clientExit(program, status, message, quiet, debuggerId)

Private slot to handle the debugged program terminating.

program (str)
  name of the exited program
status (int)
  exit code of the debugged program
message (str)
  exit message of the debugged program
quiet (bool)
  flag indicating to suppress exit info display
debuggerId (str)
  ID of the debugger backend

#### DebugUI.__clientGone

__clientGone(unplanned)

Private method to handle the disconnection of the debugger client.

unplanned
  True if the client died, False otherwise

#### DebugUI.__clientLine

__clientLine(fn, line, debuggerId, threadName, forStack)

Private method to handle a change to the current line.

fn (str)
  filename
line (int)
  linenumber
debuggerId (str)
  ID of the debugger backend
threadName (str)
  name of the thread signaling the event
forStack (bool)
  flag indicating this is for a stack dump

#### DebugUI.__clientSignal

__clientSignal(message, filename, lineNo, funcName, funcArgs, debuggerId)

Private method to handle a signal generated on the client side.

message (str)
  message of the syntax error
filename (str)
  translated filename of the syntax error position
lineNo (int)
  line number of the syntax error position
funcName (str)
  name of the function causing the signal
funcArgs (str)
  function arguments
debuggerId (str)
  ID of the debugger backend

#### DebugUI.__clientSyntaxError

__clientSyntaxError(message, filename, lineNo, characterNo)

Private method to handle a syntax error in the debugged program.

message
  message of the syntax error (string)
filename
  translated filename of the syntax error position (string)
lineNo
  line number of the syntax error position (integer)
characterNo
  character number of the syntax error position (integer)

#### DebugUI.__clientThreadSet

__clientThreadSet(debuggerId)

Private method to handle a change of the client's current thread.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__clientVariable

__clientVariable(scope, variables, debuggerId)

Private method to write the contents of a clients classvariable to the user interface.

scope (int)
  scope of the variables (-1 = empty locals, 1 = global, 0 = local)
variables (list)
  the list of variables from the client
debuggerId (str)
  ID of the debugger backend

#### DebugUI.__clientVariables

__clientVariables(scope, variables, debuggerId)

Private method to write the clients variables to the user interface.

scope (int)
  scope of the variables (-2 = no frame found, -1 = empty locals, 1 = global, 0 = local)
variables (list)
  the list of variables from the client
debuggerId (str)
  ID of the debugger backend

#### DebugUI.__clientWatchConditionError

__clientWatchConditionError(cond, debuggerId)

Private method to handle a expression error of a watch expression.

Note: This can only happen for normal watch expressions

cond (str)
  expression of the watch expression
debuggerId (str)
  ID of the debugger backend

#### DebugUI.__compileChangedProjectFiles

__compileChangedProjectFiles()

Private method to signal compilation of changed forms and resources is wanted.

#### DebugUI.__configureExceptionsFilter

__configureExceptionsFilter()

Private slot for displaying the exception filter dialog.

#### DebugUI.__configureIgnoredExceptions

__configureIgnoredExceptions()

Private slot for displaying the ignored exceptions dialog.

#### DebugUI.__configureVariablesFilters

__configureVariablesFilters()

Private slot for displaying the variables filter configuration dialog.

#### DebugUI.__continue

__continue(debuggerId="")

Private method to handle the Continue action.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__coverageProject

__coverageProject()

Private slot to handle the coverage of project action.

#### DebugUI.__coverageScript

__coverageScript()

Private slot to handle the coverage of script action.

#### DebugUI.__cursorChanged

__cursorChanged(editor)

Private slot handling the cursorChanged signal of the viewmanager.

editor
  editor window

#### DebugUI.__debugProject

__debugProject()

Private slot to handle the debug project action.

#### DebugUI.__debugScript

__debugScript()

Private slot to handle the debug script action.

#### DebugUI.__doRestart

__doRestart()

Private slot to handle the restart action to restart the last debugged file.

#### DebugUI.__editBreakpoint

__editBreakpoint()

Private slot to handle the 'Edit breakpoint' action.

#### DebugUI.__editorOpened

__editorOpened(fn)

Private slot to handle the editorOpened signal.

fn
  filename of the opened editor

#### DebugUI.__enterRemote

__enterRemote()

Private method to update the user interface.

This method is called just prior to executing some of the program being debugged.

#### DebugUI.__getClientDisassembly

__getClientDisassembly(debuggerId)

Private method to ask the client for the latest traceback disassembly.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__getClientVariables

__getClientVariables(debuggerId)

Private method to request the global and local variables.

In the first step, the global variables are requested from the client. Once these have been received, the local variables are requested. This happens in the method '__clientVariables'.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__getThreadList

__getThreadList(debuggerId)

Private method to get the list of threads from the client.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__lastClientExited

__lastClientExited()

Private slot handling the exit of the last client.

#### DebugUI.__lastEditorClosed

__lastEditorClosed()

Private slot to handle the closeProgram signal.

#### DebugUI.__moveInstructionPointer

__moveInstructionPointer(debuggerId="")

Private method to move the instruction pointer to a different line.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__nextBreakpoint

__nextBreakpoint()

Private slot to handle the 'Next breakpoint' action.

#### DebugUI.__passiveDebugStarted

__passiveDebugStarted(fn, exc)

Private slot to handle a passive debug session start.

fn
  filename of the debugged script
exc
  flag to enable exception reporting of the IDE (boolean)

#### DebugUI.__previousBreakpoint

__previousBreakpoint()

Private slot to handle the 'Previous breakpoint' action.

#### DebugUI.__profileProject

__profileProject()

Private slot to handle the profile project action.

#### DebugUI.__profileScript

__profileScript()

Private slot to handle the profile script action.

#### DebugUI.__projectClosed

__projectClosed()

Private slot to handle the projectClosed signal.

#### DebugUI.__projectOpened

__projectOpened()

Private slot to handle the projectOpened signal.

#### DebugUI.__resetUI

__resetUI(fullReset=True)

Private slot to reset the user interface.

fullReset (bool)
  flag indicating a full reset is required

#### DebugUI.__runProject

__runProject()

Private slot to handle the run project action.

#### DebugUI.__runScript

__runScript()

Private slot to handle the run script action.

#### DebugUI.__runToCursor

__runToCursor(debuggerId="")

Private method to handle the Run to Cursor action.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__runUntil

__runUntil(debuggerId="")

Private method to handle the Run Until action.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__showBreakpointsMenu

__showBreakpointsMenu()

Private method to handle the show breakpoints menu signal.

#### DebugUI.__showDebugMenu

__showDebugMenu()

Private method to set up the debug menu.

#### DebugUI.__specialContinue

__specialContinue(debuggerId="")

Private method to handle the Special Continue action.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__step

__step(debuggerId="")

Private method to handle the Step action.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__stepOut

__stepOut(debuggerId="")

Private method to handle the Step Out action.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__stepOver

__stepOver(debuggerId="")

Private method to handle the Step Over action.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__stepQuit

__stepQuit(debuggerId="")

Private method to handle the Step Quit action.

debuggerId (str)
  ID of the debugger backend

#### DebugUI.__stopScript

__stopScript()

Private slot to stop the running script.

#### DebugUI.__toggleBreakpoint

__toggleBreakpoint()

Private slot to handle the 'Set/Reset breakpoint' action.

#### DebugUI.clearHistories

clearHistories()

Public method to clear the various debug histories.

#### DebugUI.doCoverage

doCoverage(runProject, script="")

Public method to handle the coverage actions.

runProject (bool)
  flag indicating coverage of the current project (True) or script (false)
script (str)
  name of a script (optional)

#### DebugUI.doDebug

doDebug(debugProject, script="")

Public method to handle the debug actions.

debugProject (bool)
  flag indicating debugging the current project (True) or script (False)
script (str)
  name of a script (optional)

#### DebugUI.doProfile

doProfile(runProject, script="")

Public method to handle the profile actions.

runProject (bool)
  flag indicating profiling of the current project (True) or script (False)
script (str)
  name of a script (optional)

#### DebugUI.doRun

doRun(runProject, script="")

Public method to handle the run actions.

runProject (bool)
  flag indicating running the current project (True) or script (False)
script (str)
  name of a script (optional)

#### DebugUI.getActions

getActions()

Public method to get a list of all actions.

Return:
  list of all actions (list of EricAction)

#### DebugUI.getSelectedDebuggerId

getSelectedDebuggerId()

Public method to get the currently selected debugger ID.

Return:
  selected debugger ID

Return Type:
  str

#### DebugUI.initActions

initActions()

Public method defining the user interface actions.

#### DebugUI.initMenus

initMenus()

Public slot to initialize the project menu.

Return:
  the generated menu

#### DebugUI.initToolbars

initToolbars(toolbarManager)

Public slot to initialize the debug toolbars.

toolbarManager
  reference to a toolbar manager object (EricToolBarManager)

Return:
  the generated toolbars (list of QToolBar)

#### DebugUI.setArgvHistory

setArgvHistory(argsStr, clearHistories=False, history=None)

Public slot to initialize the argv history.

argsStr
  the commandline arguments (string)
clearHistories
  flag indicating, that the list should be cleared (boolean)
history
  list of history entries to be set (list of strings)

#### DebugUI.setAutoClearShell

setAutoClearShell(autoClearShell)

Public slot to initialize the autoClearShell flag.

autoClearShell
  flag indicating, that the interpreter window should be cleared (boolean)

#### DebugUI.setAutoContinue

setAutoContinue(autoContinue)

Public slot to initialize the autoContinue flag.

autoContinue
  flag indicating, that the debugger should not stop at the first executable line (boolean)

#### DebugUI.setDebugActionsEnabled

setDebugActionsEnabled(enable)

Public method to set the enabled state of the debug actions.

enable (bool)
  enable state to be set

#### DebugUI.setEnableGlobalConfigOverride

setEnableGlobalConfigOverride(overrideData)

Public method to initialize the global config override data.

overrideData (dict)
  dictionary containing a flag indicating to enable global config override and a flag indicating to redirect stdin/stdout/stderr

#### DebugUI.setEnableMultiprocess

setEnableMultiprocess(enableMultiprocess)

Public slot to initialize the enableMultiprocess flag.

enableMultiprocess (bool)
  flag indicating, that the debugger should be run in multi process mode

#### DebugUI.setEnvHistory

setEnvHistory(envStr, clearHistories=False, history=None)

Public slot to initialize the env history.

envStr
  the environment settings (string)
clearHistories
  flag indicating, that the list should be cleared (boolean)
history
  list of history entries to be set (list of strings)

#### DebugUI.setExcIgnoreList

setExcIgnoreList(excIgnoreList)

Public slot to initialize the ignored exceptions type list.

excIgnoreList
  list of ignored exception types (list of strings)

#### DebugUI.setExcList

setExcList(excList)

Public slot to initialize the exceptions type list.

excList
  list of exception types (list of strings)

#### DebugUI.setExceptionReporting

setExceptionReporting(exceptions)

Public slot to initialize the exception reporting flag.

exceptions
  flag indicating exception reporting status (boolean)

#### DebugUI.setMultiprocessNoDebugHistory

setMultiprocessNoDebugHistory(noDebugList, clearHistories=False, history=None)

Public slot to initialize the no debug list history.

noDebugList (str)
  whitespace separated list of programs not to be debugged
clearHistories (bool)
  flag indicating, that the list should be cleared
history (list of str)
  list of history entries to be set

#### DebugUI.setScriptsHistory

setScriptsHistory(scriptName, clearHistories=False, history=None)

Public slot to initialize the scripts history.

scriptName (str)
  script name
clearHistories (bool (optional))
  flag indicating, that the list should be cleared (defaults to False)
history (list of str (optional))
  list of history entries to be set (defaults to None)

#### DebugUI.setTracePython

setTracePython(tracePython)

Public slot to initialize the trace Python flag.

tracePython
  flag indicating if the Python library should be traced as well (boolean)

#### DebugUI.setWdHistory

setWdHistory(wdStr, clearHistories=False, history=None)

Public slot to initialize the wd history.

wdStr
  the working directory (string)
clearHistories
  flag indicating, that the list should be cleared (boolean)
history
  list of history entries to be set (list of strings)

#### DebugUI.showNotification

showNotification(notification, kind=NotificationTypes.INFORMATION, timeout=None)

Public method to show some notification message.

notification (str)
  message to be shown
kind (NotificationTypes)
  kind of notification to be shown
timeout (int)
  timeout for the notification (None = use configured default, 0 = indefinitely)

#### DebugUI.shutdown

shutdown()

Public method to perform shutdown actions.

#### DebugUI.shutdownServer

shutdownServer()

Public method to shut down the debug server.

This is needed to cleanly close the sockets on Win OS.

Return:
  always true

#### DebugUI.variablesFilter

variablesFilter(scope)

Public method to get the variables filter for a scope.

scope
  flag indicating global (True) or local (False) scope

Return:
  filters list

Return Type:
  list of str

Up