Table of Contents

Class: DebugServer ./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
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
clientRawInput(prompt)
emitted after a raw input request was received
clientBanner(banner)
emitted after the client banner was received
passiveDebuStarted
emitted after the debug client has connected in passive debug mode
clientGone
emitted if the client went away (planned or unplanned)
Base Classes   
QServerSocket
Methods   
__init__
clearAllBreakpoints
clearFileBreakpoints
getAllBreakpoints
getFileBreakpoints
getProjectBreakpoints
handleLine
newConnection
passiveShutDown
passiveStartUp
remoteBanner
remoteBreakpoint
remoteClientVariables
remoteContinue
remoteEval
remoteExec
remoteLoad
remoteRawInput
remoteStatement
remoteStep
remoteStepOut
remoteStepOver
remoteStepQuit
restoreBreakpoints
sendCommand
shutdownServer
startClient
startRemote
  __init__ 
__init__ ( self )

Constructor

  clearAllBreakpoints 
clearAllBreakpoints ( self )

Public method (slot) to clear the local list of breakpoints.

  clearFileBreakpoints 
clearFileBreakpoints ( self,  fn )

Public method to clear the local list of breakpoints for a file.

Arguments

fn
filename of the breakpoints to be cleared (string)
  getAllBreakpoints 
getAllBreakpoints ( self )

Public method to get all breakpoints set in the server.

Returns

list of all breakpoints

  getFileBreakpoints 
getFileBreakpoints ( self,  filename )

Public method to get all breakpoints of a specific file.

Arguments

filename
the filename of the breakpoints to retrieve (string)

Returns

list of all breakpoints belonging to filename

  getProjectBreakpoints 
getProjectBreakpoints ( self,  filelist )

Public method to get all breakpoints of the current project.

Arguments

filelist
list of filenames belonging to the current project

Returns

list of all breakpoint belonging to the current project

  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 )

Private method to handle a passive debug connection.

  remoteBanner 
remoteBanner ( self )

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

  remoteBreakpoint 
remoteBreakpoint (
        self,
        fn,
        line,
        set,
        cond,
        )

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

Public method to continue the debugged program.

  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)
  remoteRawInput 
remoteRawInput ( self,  s )

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

Arguments

s
the raw input (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.

  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 on Fri Mar 14 19:54:45 2003 by HappyDoc version 2.1