Table of Contents

Class: DebugServer eric3/Debugger/DebugServer.py

Class implementing the debug server embedded within the IDE.

Signals

clientRawInputSent
emitted after the data was sent to the debug client
clientLine(filename, lineno)
emitted after the debug client has executed a line of code
clientStack(stack)
emitted after the debug client has executed a line of code
clientVariables(variables)
emitted after a variables dump has been received
clientVariable(variables)
emitted after a dump for one class variable has been received
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.
clientException(exception)
emitted after an exception occured on the client side
clientSyntaxError(exception)
emitted after a syntax error has been detected on the client side
clientExit(exitcode)
emitted after the client has exited
clientClearBreak(filename, lineno)
emitted after the debug client has decided to clear a temporary breakpoint
clientRawInput(prompt)
emitted after a raw input request was received
clientBanner(banner)
emitted after the client banner was received
clientCompletionList(completionList, text)
emitted after the client the commandline completion list and the reworked searchstring was received from the client
passiveDebugStarted
emitted after the debug client has connected in passive debug mode
clientGone
emitted if the client went away (planned or unplanned)
utPrepared(nrTests, exc_type, exc_value)
emitted after the client has loaded a unittest suite
utFinished
emitted after the client signalled the end of the unittest
utStartTest(testname, testdocu)
emitted after the client has started a test
utStopTest
emitted after the client has finished a test
utTestFailed(testname, exc_info)
emitted after the client reported a failed test
utTestErrored(testname, exc_info)
emitted after the client reported an errored test
Base Classes   
QServerSocket
Methods   
__init__
handleLine
newConnection
passiveShutDown
passiveStartUp
remoteBanner
remoteBreakpoint
remoteBreakpointEnable
remoteBreakpointIgnore
remoteClientVariable
remoteClientVariables
remoteCompletion
remoteContinue
remoteCoverage
remoteEval
remoteExec
remoteLoad
remoteProfile
remoteRawInput
remoteRun
remoteStatement
remoteStep
remoteStepOut
remoteStepOver
remoteStepQuit
remoteUTPrepare
remoteUTRun
remoteUTStop
restoreBreakpoints
sendCommand
shutdownServer
startClient
startRemote
  __init__ 
__init__ ( self )

Constructor

  handleLine 
handleLine ( self )

Private method to handle data from the client.

  newConnection 
newConnection ( self,  sockfd )

Reimplemented to handle a new connection.

Arguments

sockfd
the socket descriptor
  passiveShutDown 
passiveShutDown ( self )

Private method to shut down a passive debug connection.

  passiveStartUp 
passiveStartUp ( self,  fn )

Private method to handle a passive debug connection.

Arguments

fn
filename of the debugged script
  remoteBanner 
remoteBanner ( self )

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

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

Public method to set or clear a breakpoint.

Arguments

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)
  remoteBreakpointEnable 
remoteBreakpointEnable (
        self,
        fn,
        line,
        enable,
        )

Public method to enable or disable a breakpoint.

Arguments

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

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

Arguments

fn
filename the breakpoint belongs to (string)
line
linenumber of the breakpoint (int)
count
number of occurences to ignore (int)
  remoteClientVariable 
remoteClientVariable (
        self,
        scope,
        filter,
        var,
        framenr=0,
        )

Public method to request the variables of the debugged program.

Arguments

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)
  remoteClientVariables 
remoteClientVariables (
        self,
        scope,
        filter,
        framenr=0,
        )

Public method to request the variables of the debugged program.

Arguments

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)
  remoteCompletion 
remoteCompletion ( self,  text )

Public slot to get the a list of possible commandline completions from the remote client.

Arguments

text
the text to be completed (string or QString)

  remoteContinue 
remoteContinue ( self )

Public method to continue the debugged program.

  remoteCoverage 
remoteCoverage (
        self,
        fn,
        argv,
        wd,
        erase,
        )

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

Arguments

fn
the filename to run (string)
argv
the commandline arguments to pass to the program (list of strings)
wd
the working directory for the program (string)
erase
flag indicating that coverage info should be cleared first (boolean)
  remoteEval 
remoteEval ( self,  arg )

Public method to evaluate arg in the current context of the debugged program.

Arguments

arg
the arguments to evaluate (string)
  remoteExec 
remoteExec ( self,  stmt )

Public method to execute stmt in the current context of the debugged program.

Arguments

stmt
statement to execute (string)
  remoteLoad 
remoteLoad (
        self,
        fn,
        argv,
        wd,
        )

Public method to load a new program to debug.

Arguments

fn
the filename to debug (string)
argv
the commandline arguments to pass to the program (list of strings)
wd
the working directory for the program (string)
  remoteProfile 
remoteProfile (
        self,
        fn,
        argv,
        wd,
        erase,
        )

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

Arguments

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

Public method to send the raw input to the debugged program.

Arguments

s
the raw input (string)
  remoteRun 
remoteRun (
        self,
        fn,
        argv,
        wd,
        )

Public method to load a new program to run.

Arguments

fn
the filename to run (string)
argv
the commandline arguments to pass to the program (list of strings)
wd
the working directory for the program (string)
  remoteStatement 
remoteStatement ( self,  stmt )

Public method to execute a Python statement.

Arguments

stmt
the Python statement to execute (string). It should not have a trailing newline.
  remoteStep 
remoteStep ( self )

Public method to single step the debugged program.

  remoteStepOut 
remoteStepOut ( self )

Public method to step out the debugged program.

  remoteStepOver 
remoteStepOver ( self )

Public method to step over the debugged program.

  remoteStepQuit 
remoteStepQuit ( self )

Public method to stop the debugged program.

  remoteUTPrepare 
remoteUTPrepare (
        self,
        fn,
        tn,
        cov,
        covname,
        coverase,
        )

Public method to prepare a new unittest run.

Arguments

fn
the filename to load (string)
tn
the testname to load (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
  remoteUTRun 
remoteUTRun ( self )

Public method to start a unittest run.

  remoteUTStop 
remoteUTStop ( self )

public method to stop a unittest run.

  restoreBreakpoints 
restoreBreakpoints ( self )

Private method to restore the break points after a restart.

  sendCommand 
sendCommand ( self,  cmd )

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

Arguments

cmd
command to send to the debug client (string)
  shutdownServer 
shutdownServer ( self )

Public method to cleanly shut down.

It closes our socket and shuts down the debug client. (Needed on Win OS)

  startClient 
startClient ( self,  unplanned=1 )

Private method to start a debug client.

Arguments

unplanned
flag indicating that the client has died
  startRemote 
startRemote ( self )

Private method to start a remote interpreter.


Table of Contents

This document was automatically generated by HappyDoc version 2.1