eric3.Debugger.DebugServer

Module implementing the debug server.

Classes

DebugServer Class implementing the debug server embedded within the IDE.

Functions

None


DebugServer

Class implementing the debug server embedded within the IDE.

Signals

clientBanner(banner)
emitted after the client banner was received
clientCapabilities(capabilities, 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
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

QServerSocket

Methods

DebugServer Constructor
getClientCapabilities Public method to retrieve the debug clients capabilities.
handleClientCapabilities Private slot to handle the reporting of the clients capabilities.
handleLine Private method to handle data from the client.
newConnection Reimplemented to handle a new connection.
passiveShutDown Private method to shut down a passive debug connection.
passiveStartUp Private method to handle a passive debug connection.
remoteBanner Public slot to get the banner info of the remote client.
remoteBreakpoint Public method to set or clear a breakpoint.
remoteBreakpointEnable Public method to enable or disable a breakpoint.
remoteBreakpointIgnore Public method to ignore a breakpoint the next couple of occurences.
remoteCapabilities Public slot to get the debug clients capabilities.
remoteClientSetFilter Public method to set a variables filter list.
remoteClientVariable Public method to request the variables of the debugged program.
remoteClientVariables Public method to request the variables of the debugged program.
remoteCompletion Public slot to get the a list of possible commandline completions
remoteContinue Public method to continue the debugged program.
remoteCoverage Public method to load a new program to collect coverage data.
remoteCyclops Public method to load a new program to collect profiling data.
remoteEnvironment Public method to set the environment for a program to debug, run, ...
remoteEval Public method to evaluate arg in the current context of the debugged program.
remoteExec Public method to execute stmt in the current context of the debugged program.
remoteLoad Public method to load a new program to debug.
remoteProfile Public method to load a new program to collect profiling data.
remoteRawInput Public method to send the raw input to the debugged program.
remoteRun Public method to load a new program to run.
remoteStatement Public method to execute a Python statement.
remoteStep Public method to single step the debugged program.
remoteStepOut Public method to step out the debugged program.
remoteStepOver Public method to step over the debugged program.
remoteStepQuit Public method to stop the debugged program.
remoteUTPrepare Public method to prepare a new unittest run.
remoteUTRun Public method to start a unittest run.
remoteUTStop public method to stop a unittest run.
remoteWatchpoint Public method to set or clear a watchpoint.
remoteWatchpointEnable Public method to enable or disable a watchpoint.
remoteWatchpointIgnore Public method to ignore a watchpoint the next couple of occurences.
restoreBreakpoints Private method to restore the break points and watch points after a restart.
sendCommand Private method to send a single line command to the client.
setClientType Private method to set the client type.
setWatchpointViewer Public method to set the watchpoint viewer.
shutdownServer Public method to cleanly shut down.
startClient Public method to start a debug client.
startRemote Public method to start a remote interpreter.
startRemotePython Private method to start a remote Python interpreter.
startRemoteRuby Private method to start a remote Ruby interpreter.

DebugServer (Constructor)

DebugServer()

Constructor

DebugServer.getClientCapabilities

getClientCapabilities(type)

Public method to retrieve the debug clients capabilities.

type
debug client type (string)
Returns:
debug client capabilities (integer)

DebugServer.handleClientCapabilities

handleClientCapabilities(cap, clType)

Private slot to handle the reporting of the clients capabilities.

cap
client capabilities (integer)
clType
type of the debug client (string)

DebugServer.handleLine

handleLine()

Private method to handle data from the client.

DebugServer.newConnection

newConnection(sockfd)

Reimplemented to handle a new connection.

sockfd
the socket descriptor

DebugServer.passiveShutDown

passiveShutDown()

Private method to shut down a passive debug connection.

DebugServer.passiveStartUp

passiveStartUp(fn, exc)

Private method to handle a passive debug connection.

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

DebugServer.remoteBanner

remoteBanner()

Public slot to get the banner info of the remote client.

DebugServer.remoteBreakpoint

remoteBreakpoint(fn, line, set, cond=None, temp=0)

Public method to set or clear a breakpoint.

cond
condition of the breakpoint (string)
fn
filename the breakpoint belongs to (string)
line
linenumber of the breakpoint (int)
set
flag indicating setting or resetting a breakpoint (boolean)
temp
flag indicating a temporary breakpoint (boolean)

DebugServer.remoteBreakpointEnable

remoteBreakpointEnable(fn, line, enable)

Public method to enable or disable a breakpoint.

enable
flag indicating enabling or disabling a breakpoint (boolean)
fn
filename the breakpoint belongs to (string)
line
linenumber of the breakpoint (int)

DebugServer.remoteBreakpointIgnore

remoteBreakpointIgnore(fn, line, count)

Public method to ignore a breakpoint the next couple of occurences.

count
number of occurences to ignore (int)
fn
filename the breakpoint belongs to (string)
line
linenumber of the breakpoint (int)

DebugServer.remoteCapabilities

remoteCapabilities()

Public slot to get the debug clients capabilities.

DebugServer.remoteClientSetFilter

remoteClientSetFilter(scope, filter)

Public method to set a variables filter list.

filter
regexp string for variable names to filter out (string)
scope
the scope of the variables (0 = local, 1 = global)

DebugServer.remoteClientVariable

remoteClientVariable(scope, filter, var, framenr=0)

Public method to request the variables of the debugged program.

filter
list of variable types to filter out (list of int)
framenr
framenumber of the variables to retrieve (int)
scope
the scope of the variables (0 = local, 1 = global)
var
list encoded name of variable to retrieve (string)

DebugServer.remoteClientVariables

remoteClientVariables(scope, filter, framenr=0)

Public method to request the variables of the debugged program.

filter
list of variable types to filter out (list of int)
framenr
framenumber of the variables to retrieve (int)
scope
the scope of the variables (0 = local, 1 = global)

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()

Public method to continue the debugged program.

DebugServer.remoteCoverage

remoteCoverage(fn, argv, wd, env, erase, exclude="")

Public method to load a new program to collect coverage data.

argv
the commandline arguments to pass to the program (list of strings)
env
environment settings (string)
erase
flag indicating that coverage info should be cleared first (boolean)
exclude
searchpattern marking line to exclude from coverage
fn
the filename to run (string)
wd
the working directory for the program (string)

DebugServer.remoteCyclops

remoteCyclops(fn, argv, wd, env, modfunc, reports)

Public method to load a new program to collect profiling data.

argv
the commandline arguments to pass to the program (list of strings)
env
environment settings (string)
fn
the filename to run (string)
modfunc
name of a module function which is the main entry point (string)
reports
bit mask specifying the reports wanted (integer)
wd
the working directory for the program (string)

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, tracePython)

Public method to load a new program to debug.

argv
the commandline arguments to pass to the program (list of strings)
env
environment settings (string)
fn
the filename to debug (string)
tracePython
flag indicating if the Python library should be traced as well
wd
the working directory for the program (string)

DebugServer.remoteProfile

remoteProfile(fn, argv, wd, env, erase)

Public method to load a new program to collect profiling data.

argv
the commandline arguments to pass to the program (list of strings)
env
environment settings (string)
erase
flag indicating that timing info should be cleared first (boolean)
fn
the filename to run (string)
wd
the working directory for the program (string)

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)

Public method to load a new program to run.

argv
the commandline arguments to pass to the program (list of strings)
env
environment settings (string)
fn
the filename to run (string)
wd
the working directory for the program (string)

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, cov, covname, coverase)

Public method to prepare a new unittest run.

cov
flag indicating collection of coverage data is requested
coverase
flag indicating erasure of coverage data is requested
covname
filename to be used to assemble the coverage caches filename
fn
the filename to load (string)
tn
the testname to load (string)

DebugServer.remoteUTRun

remoteUTRun()

Public method to start a unittest run.

DebugServer.remoteUTStop

remoteUTStop()

public method to stop a unittest run.

DebugServer.remoteWatchpoint

remoteWatchpoint(cond, set, temp=0)

Public 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)

Public 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)

Public 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 break points and watch points after a restart.

DebugServer.sendCommand

sendCommand(cmd)

Private method to send a single line command to the client.

cmd
command to send to the debug client (string)

DebugServer.setClientType

setClientType(clType)

Private method to set the client type.

clType
type of client to be started (string, Python or Ruby)

DebugServer.setWatchpointViewer

setWatchpointViewer(watchpointViewer)

Public method to set the watchpoint viewer.

reference
to the watchpoint viewer widget

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=1, clType=None)

Public method to start a debug client.

clType
type of client to be started (string, Python or Ruby)
unplanned
flag indicating that the client has died

DebugServer.startRemote

startRemote()

Public method to start a remote interpreter.

DebugServer.startRemotePython

startRemotePython()

Private method to start a remote Python interpreter.

DebugServer.startRemoteRuby

startRemoteRuby()

Private method to start a remote Ruby interpreter.

Up