eric4.Debugger.DebugServer
Module implementing the debug server.
Classes
| DebugServer |
Class implementing the debug server embedded within the IDE. |
Functions
DebugServer
Class implementing the debug server embedded within the IDE.
Signals
- clientBanner(banner)
-
emitted after the client banner was received
- clientBreakConditionError(fn, lineno)
-
emitted after the client has signaled
a syntax error in a breakpoint condition
- clientCapabilities(int capabilities, QString cltype)
-
emitted after the clients
capabilities were received
- clientClearBreak(filename, lineno)
-
emitted after the debug client
has decided to clear a temporary breakpoint
- clientClearWatch(condition)
-
emitted after the debug client
has decided to clear a temporary watchpoint
- clientCompletionList(completionList, text)
-
emitted after the client
the commandline completion list and the reworked searchstring was
received from the client
- clientException(exception)
-
emitted after an exception occured on the
client side
- clientExit(exitcode)
-
emitted after the client has exited
- clientGone
-
emitted if the client went away (planned or unplanned)
- clientLine(filename, lineno)
-
emitted after the debug client has executed a
line of code
- clientOutput
-
emitted after the client has sent some output
- clientRawInput(prompt, echo)
-
emitted after a raw input request was received
- clientRawInputSent
-
emitted after the data was sent to the debug client
- clientStack(stack)
-
emitted after the debug client has executed a
line of code
- clientStatement(boolean)
-
emitted after an interactive command has
been executed. The parameter is 0 to indicate that the command is
complete and 1 if it needs more input.
- clientSyntaxError(exception)
-
emitted after a syntax error has been detected
on the client side
- clientVariable(variables)
-
emitted after a dump for one class variable has
been received
- clientVariables(variables)
-
emitted after a variables dump has been received
- clientWatchConditionError(fn, lineno)
-
emitted after the client has signaled
a syntax error in a watchpoint condition
- cyclopsError(fn, modfunc)
-
emitted after the client reported an error
while performing a Cyclops run
- passiveDebugStarted
-
emitted after the debug client has connected in
passive debug mode
- utFinished
-
emitted after the client signalled the end of the unittest
- utPrepared(nrTests, exc_type, exc_value)
-
emitted after the client has
loaded a unittest suite
- utStartTest(testname, testdocu)
-
emitted after the client has started
a test
- utStopTest
-
emitted after the client has finished a test
- utTestErrored(testname, exc_info)
-
emitted after the client reported
an errored test
- utTestFailed(testname, exc_info)
-
emitted after the client reported
a failed test
Derived from
QTcpServer
Methods
DebugServer (Constructor)
DebugServer()
Constructor
DebugServer.__addBreakPoints
__addBreakPoints(parentIndex, start, end)
Private slot to add breakpoints.
- parentIndex
-
index of parent item (QModelIndex)
- start
-
start row (integer)
- end
-
end row (integer)
DebugServer.__addWatchPoints
__addWatchPoints(parentIndex, start, end)
Private slot to set a watchpoint.
- parentIndex
-
index of parent item (QModelIndex)
- start
-
start row (integer)
- end
-
end row (integer)
DebugServer.__breakPointDataAboutToBeChanged
__breakPointDataAboutToBeChanged(startIndex, endIndex)
Private slot to handle the dataAboutToBeChanged signal of the breakpoint model.
- startIndex
-
start index of the rows to be changed (QModelIndex)
- endIndex
-
end index of the rows to be changed (QModelIndex)
DebugServer.__changeBreakPoints
__changeBreakPoints(startIndex, endIndex)
Private slot to set changed breakpoints.
- indexes
-
indexes of changed breakpoints.
DebugServer.__changeWatchPoints
__changeWatchPoints(startIndex, endIndex)
Private slot to set changed watchpoints.
- startIndex
-
start index of the rows to be changed (QModelIndex)
- endIndex
-
end index of the rows to be changed (QModelIndex)
DebugServer.__clientClearBreakPoint
__clientClearBreakPoint(fn, lineno)
Private slot to handle the clientClearBreak signal.
- fn
-
filename of breakpoint to clear (string or QString)
- lineno
-
line number of breakpoint to clear (integer)
DebugServer.__clientClearWatchPoint
__clientClearWatchPoint(condition)
Private slot to handle the clientClearWatch signal.
- condition
-
condition of watchpoint to clear (string or QString)
DebugServer.__createDebuggerInterface
__createDebuggerInterface()
Private slot to create the debugger interface object.
DebugServer.__deleteBreakPoints
__deleteBreakPoints(parentIndex, start, end)
Private slot to delete breakpoints.
- parentIndex
-
index of parent item (QModelIndex)
- start
-
start row (integer)
- end
-
end row (integer)
DebugServer.__deleteWatchPoints
__deleteWatchPoints(parentIndex, start, end)
Private slot to delete watchpoints.
- parentIndex
-
index of parent item (QModelIndex)
- start
-
start row (integer)
- end
-
end row (integer)
DebugServer.__makeWatchCondition
__makeWatchCondition(cond, special)
Private method to construct the condition string.
- cond
-
condition (string or QString)
- special
-
special condition (string or QString)
- Returns:
-
condition string (QString)
DebugServer.__newConnection
__newConnection()
Private slot to handle a new connection.
DebugServer.__passiveShutDown
__passiveShutDown()
Private method to shut down a passive debug connection.
DebugServer.__registerDebuggerInterfaces
__registerDebuggerInterfaces()
Private method to register the available debugger interface modules.
DebugServer.__remoteBreakpointEnable
__remoteBreakpointEnable(fn, line, enable)
Private method to enable or disable a breakpoint.
- fn
-
filename the breakpoint belongs to (string)
- line
-
linenumber of the breakpoint (int)
- enable
-
flag indicating enabling or disabling a breakpoint (boolean)
DebugServer.__remoteBreakpointIgnore
__remoteBreakpointIgnore(fn, line, count)
Private method to ignore a breakpoint the next couple of occurences.
- fn
-
filename the breakpoint belongs to (string)
- line
-
linenumber of the breakpoint (int)
- count
-
number of occurences to ignore (int)
DebugServer.__remoteWatchpoint
__remoteWatchpoint(cond, set, temp = False)
Private method to set or clear a watchpoint.
- cond
-
condition of the watchpoint (string)
- set
-
flag indicating setting or resetting a watchpoint (boolean)
- temp
-
flag indicating a temporary watchpoint (boolean)
DebugServer.__remoteWatchpointEnable
__remoteWatchpointEnable(cond, enable)
Private method to enable or disable a watchpoint.
- cond
-
condition of the watchpoint (string)
- enable
-
flag indicating enabling or disabling a watchpoint (boolean)
DebugServer.__remoteWatchpointIgnore
__remoteWatchpointIgnore(cond, count)
Private method to ignore a watchpoint the next couple of occurences.
- cond
-
condition of the watchpoint (string)
- count
-
number of occurences to ignore (int)
DebugServer.__restoreBreakpoints
__restoreBreakpoints()
Private method to restore the breakpoints after a restart.
DebugServer.__restoreWatchpoints
__restoreWatchpoints()
Private method to restore the watchpoints after a restart.
DebugServer.__setClientType
__setClientType(clType)
Private method to set the client type.
- clType
-
type of client to be started (string)
DebugServer.__splitWatchCondition
__splitWatchCondition(cond)
Private method to split a remote watchpoint condition.
- cond
-
remote condition (string or QString)
- Returns:
-
tuple of local condition (string) and special condition (string)
DebugServer.__watchPointDataAboutToBeChanged
__watchPointDataAboutToBeChanged(startIndex, endIndex)
Private slot to handle the dataAboutToBeChanged signal of the watchpoint model.
- startIndex
-
start index of the rows to be changed (QModelIndex)
- endIndex
-
end index of the rows to be changed (QModelIndex)
DebugServer.clientBanner
clientBanner(version, platform, debugClient)
Public method to process the client banner info.
- version
-
interpreter version info (string)
- platform
-
hostname of the client (string)
- debugClient
-
additional debugger type info (string)
DebugServer.clientBreakConditionError
clientBreakConditionError(filename, lineno)
Public method to process the client breakpoint condition error info.
- filename
-
filename of the breakpoint (string)
- lineno
-
line umber of the breakpoint (integer)
DebugServer.clientCapabilities
clientCapabilities(capabilities, clientType)
Public method to process the client capabilities info.
- capabilities
-
bitmaks with the client capabilities (integer)
- clientType
-
type of the debug client (string)
DebugServer.clientClearBreak
clientClearBreak(filename, lineno)
Public method to process the client clear breakpoint command.
- filename
-
filename of the breakpoint (string)
- lineno
-
line umber of the breakpoint (integer)
DebugServer.clientClearWatch
clientClearWatch(filename, lineno)
Public method to process the client clear watchpoint command.
- filename
-
filename of the watchpoint (string)
- lineno
-
line umber of the watchpoint (integer)
DebugServer.clientCompletionList
clientCompletionList(completionList, text)
Public method to process the client auto completion info.
- completionList
-
list of possible completions (list of strings)
- text
-
the text to be completed (string)
DebugServer.clientCyclopsError
clientCyclopsError(filename, modfunc)
Public metho to process the client cyclops error info.
- filename
-
filename of the module to be run (string)
- modfunc
-
module function which is the main entry point (string)
DebugServer.clientException
clientException(exceptionType, exceptionMessage, stackTrace)
Public method to process the exception info from the client.
- exceptionType
-
type of exception raised (string)
- exceptionMessage
-
message given by the exception (string)
- stackTrace
-
list of stack entries with the exception position
first. Each stack entry is a list giving the filename and the linenumber.
DebugServer.clientExit
clientExit(status)
Public method to process the client exit status.
- status
-
exit code as a string (string)
DebugServer.clientLine
clientLine(filename, lineno)
Public method to process cliet position feedback.
- filename
-
name of the file currently being executed (string)
- lineno
-
line of code currently being executed (integer)
DebugServer.clientOutput
clientOutput(line)
Public method to process a line of client output.
- line
-
client output (string)
DebugServer.clientRawInput
clientRawInput(prompt, echo)
Public method to process the client raw input command.
- prompt
-
the input prompt (string)
- echo
-
flag indicating an echoing of the input (boolean)
DebugServer.clientStack
clientStack(stack)
Public method to process a client's stack information.
- stack
-
list of stack entries. Each entry is a tuple of three
values giving the filename, linenumber and method
(list of lists of (string, integer, string))
DebugServer.clientStatement
clientStatement(more)
Public method to process the input response from the client.
- more
-
flag indicating that more user input is required
DebugServer.clientSyntaxError
clientSyntaxError(message, filename, lineNo, characterNo)
Public method to process the syntax error info from the client.
- 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)
DebugServer.clientUtFinished
clientUtFinished()
Public method to process the client unit test finished info.
DebugServer.clientUtPrepared
clientUtPrepared(result, exceptionType, exceptionValue)
Public method to process the client unittest prepared info.
- result
-
number of test cases (0 = error) (integer)
- exceptionType
-
exception type (string)
- exceptionValue
-
exception message (string)
DebugServer.clientUtStartTest
clientUtStartTest(testname, doc)
Public method to process the client start test info.
- testname
-
name of the test (string)
- doc
-
short description of the test (string)
DebugServer.clientUtStopTest
clientUtStopTest()
Public method to process the client stop test info.
DebugServer.clientUtTestErrored
clientUtTestErrored(testname, traceback)
Public method to process the client test errored info.
- testname
-
name of the test (string)
- traceback
-
lines of traceback info (string)
DebugServer.clientUtTestFailed
clientUtTestFailed(testname, traceback)
Public method to process the client test failed info.
- testname
-
name of the test (string)
- traceback
-
lines of traceback info (string)
DebugServer.clientVariable
clientVariable(scope, variables)
Public method to process the client variable info.
- scope
-
scope of the variables (-1 = empty global, 0 = global, 1 = local)
- variables
-
the list of members of a classvariable from the client
DebugServer.clientVariables
clientVariables(scope, variables)
Public method to process the client variables info.
- scope
-
scope of the variables (-1 = empty global, 0 = global, 1 = local)
- variables
-
the list of variables from the client
DebugServer.clientWatchConditionError
clientWatchConditionError(filename, lineno)
Public method to process the client watchpoint condition error info.
- filename
-
filename of the watchpoint (string)
- lineno
-
line umber of the watchpoint (integer)
DebugServer.getBreakPointModel
getBreakPointModel()
Public slot to get a reference to the breakpoint model object.
- Returns:
-
reference to the breakpoint model object (BreakPointModel)
DebugServer.getClientCapabilities
getClientCapabilities(type)
Public method to retrieve the debug clients capabilities.
- type
-
debug client type (string)
- Returns:
-
debug client capabilities (integer)
DebugServer.getSupportedLanguages
getSupportedLanguages(shellOnly = False)
Public slot to return the supported programming languages.
- shellOnly
-
flag indicating only languages supporting an
interactive shell should be returned
- Returns:
-
list of supported languages (list of strings)
DebugServer.getWatchPointModel
getWatchPointModel()
Public slot to get a reference to the watchpoint model object.
- Returns:
-
reference to the watchpoint model object (WatchPointModel)
DebugServer.passiveStartUp
passiveStartUp(fn, exc)
Public method to handle a passive debug connection.
- fn
-
filename of the debugged script (string)
- exc
-
flag to enable exception reporting of the IDE (boolean)
DebugServer.remoteBanner
remoteBanner()
Public slot to get the banner info of the remote client.
DebugServer.remoteBreakpoint
remoteBreakpoint(fn, line, set, cond=None, temp=False)
Public method to set or clear a breakpoint.
- fn
-
filename the breakpoint belongs to (string)
- line
-
linenumber of the breakpoint (int)
- set
-
flag indicating setting or resetting a breakpoint (boolean)
- cond
-
condition of the breakpoint (string)
- temp
-
flag indicating a temporary breakpoint (boolean)
DebugServer.remoteCapabilities
remoteCapabilities()
Public slot to get the debug clients capabilities.
DebugServer.remoteClientSetFilter
remoteClientSetFilter(scope, filter)
Public method to set a variables filter list.
- scope
-
the scope of the variables (0 = local, 1 = global)
- filter
-
regexp string for variable names to filter out (string)
DebugServer.remoteClientVariable
remoteClientVariable(scope, filter, var, framenr = 0)
Public method to request the variables of the debugged program.
- scope
-
the scope of the variables (0 = local, 1 = global)
- filter
-
list of variable types to filter out (list of int)
- var
-
list encoded name of variable to retrieve (string)
- framenr
-
framenumber of the variables to retrieve (int)
DebugServer.remoteClientVariables
remoteClientVariables(scope, filter, framenr = 0)
Public method to request the variables of the debugged program.
- scope
-
the scope of the variables (0 = local, 1 = global)
- filter
-
list of variable types to filter out (list of int)
- framenr
-
framenumber of the variables to retrieve (int)
DebugServer.remoteCompletion
remoteCompletion(text)
Public slot to get the a list of possible commandline completions
from the remote client.
- text
-
the text to be completed (string or QString)
DebugServer.remoteContinue
remoteContinue(special = False)
Public method to continue the debugged program.
- special
-
flag indicating a special continue operation
DebugServer.remoteCoverage
remoteCoverage(fn, argv, wd, env, autoClearShell = True, erase = False, exclude = "", forProject = False)
Public method to load a new program to collect coverage data.
- fn
-
the filename to run (string)
- argv
-
the commandline arguments to pass to the program (string or QString)
- wd
-
the working directory for the program (string)
- env
-
environment settings (string)
- autoClearShell=
-
flag indicating, that the interpreter window should
be cleared (boolean)
- erase=
-
flag indicating that coverage info should be
cleared first (boolean)
- exclude=
-
searchpattern marking line to exclude from coverage
- forProject=
-
flag indicating a project related action (boolean)
DebugServer.remoteCyclops
remoteCyclops(fn, argv, wd, env, modfunc, reports, autoClearShell = True, forProject = False)
Public method to load a new program to collect profiling data.
- fn
-
the filename to run (string)
- argv
-
the commandline arguments to pass to the program (string or QString)
- wd
-
the working directory for the program (string)
- env
-
environment settings (string)
- modfunc
-
name of a module function which is the main
entry point (string)
- reports
-
bit mask specifying the reports wanted (integer)
- autoClearShell=
-
flag indicating, that the interpreter window should
be cleared (boolean)
- forProject=
-
flag indicating a project related action (boolean)
DebugServer.remoteEnvironment
remoteEnvironment(env)
Public method to set the environment for a program to debug, run, ...
- env
-
environment settings (string)
DebugServer.remoteEval
remoteEval(arg)
Public method to evaluate arg in the current context of the debugged program.
- arg
-
the arguments to evaluate (string)
DebugServer.remoteExec
remoteExec(stmt)
Public method to execute stmt in the current context of the debugged program.
- stmt
-
statement to execute (string)
DebugServer.remoteLoad
remoteLoad(fn, argv, wd, env, autoClearShell = True, tracePython = False, autoContinue = True, forProject = False)
Public method to load a new program to debug.
- fn
-
the filename to debug (string)
- argv
-
the commandline arguments to pass to the program (string or QString)
- wd
-
the working directory for the program (string)
- env
-
environment settings (string)
- autoClearShell=
-
flag indicating, that the interpreter window should
be cleared (boolean)
- tracePython=
-
flag indicating if the Python library should be traced
as well (boolean)
- autoContinue=
-
flag indicating, that the debugger should not stop
at the first executable line (boolean)
- forProject=
-
flag indicating a project related action (boolean)
DebugServer.remoteProfile
remoteProfile(fn, argv, wd, env, autoClearShell = True, erase = False, forProject = False)
Public method to load a new program to collect profiling data.
- fn
-
the filename to run (string)
- argv
-
the commandline arguments to pass to the program (string or QString)
- wd
-
the working directory for the program (string)
- env
-
environment settings (string)
- autoClearShell=
-
flag indicating, that the interpreter window should
be cleared (boolean)
- erase=
-
flag indicating that timing info should be cleared first (boolean)
- forProject=
-
flag indicating a project related action (boolean)
DebugServer.remoteRawInput
remoteRawInput(s)
Public method to send the raw input to the debugged program.
- s
-
the raw input (string)
DebugServer.remoteRun
remoteRun(fn, argv, wd, env, autoClearShell = True, forProject = False)
Public method to load a new program to run.
- fn
-
the filename to run (string)
- argv
-
the commandline arguments to pass to the program (string or QString)
- wd
-
the working directory for the program (string)
- env
-
environment settings (string)
- autoClearShell=
-
flag indicating, that the interpreter window should
be cleared (boolean)
- forProject=
-
flag indicating a project related action (boolean)
DebugServer.remoteStatement
remoteStatement(stmt)
Public method to execute a Python statement.
- stmt
-
the Python statement to execute (string). It
should not have a trailing newline.
DebugServer.remoteStep
remoteStep()
Public method to single step the debugged program.
DebugServer.remoteStepOut
remoteStepOut()
Public method to step out the debugged program.
DebugServer.remoteStepOver
remoteStepOver()
Public method to step over the debugged program.
DebugServer.remoteStepQuit
remoteStepQuit()
Public method to stop the debugged program.
DebugServer.remoteUTPrepare
remoteUTPrepare(fn, tn, tfn, cov, covname, coverase)
Public method to prepare a new unittest run.
- fn
-
the filename to load (string)
- tn
-
the testname to load (string)
- tfn
-
the test function name to load tests from (string)
- cov
-
flag indicating collection of coverage data is requested
- covname
-
filename to be used to assemble the coverage caches
filename
- coverase
-
flag indicating erasure of coverage data is requested
DebugServer.remoteUTRun
remoteUTRun()
Public method to start a unittest run.
DebugServer.remoteUTStop
remoteUTStop()
public method to stop a unittest run.
DebugServer.shutdownServer
shutdownServer()
Public method to cleanly shut down.
It closes our socket and shuts down
the debug client. (Needed on Win OS)
DebugServer.startClient
startClient(unplanned = True, clType = None, forProject = False)
Public method to start a debug client.
- unplanned
-
flag indicating that the client has died (boolean)
- clType
-
type of client to be started (string)
- forProject
-
flag indicating a project related action (boolean)