# eric6.DebugClients.Python.DebugUtilities

Module implementing utilities functions for the debug client.

### Global Attributes

ArgInfo

### Classes

None

### Functions

_getfullargs | Protected function to get information about the arguments accepted by a code object.
formatargvalues | Function to format an argument spec from the 4 values returned by getargvalues.
getargvalues | Function to get information about arguments passed into a particular frame.
prepareJsonCommand | Function to prepare a single command or response for transmission to the IDE.

## _getfullargs

_getfullargs(co)

Protected function to get information about the arguments accepted by a code object.

co (code)
  reference to a code object to be processed

Returns:
  tuple of four things, where 'args' and 'kwonlyargs' are lists of argument names, and 'varargs' and 'varkw' are the names of the * and ** arguments or None.

Raises TypeError:
  raised if the input parameter is not a code object

Up

## formatargvalues

formatargvalues(args, varargs, varkw, localsDict, formatarg=str, formatvarargs=lambda name: '*' + name, formatvarkw=lambda name: '**' + name, formatvalue=lambda value: '=' + repr(value))

Function to format an argument spec from the 4 values returned by getargvalues.

args (list of str)
  list of argument names
varargs (str)
  name of the variable arguments
varkw (str)
  name of the keyword arguments
localsDict (dict)
  reference to the local variables dictionary
formatarg= (func)
  argument formatting function
formatvarargs= (func)
  variable arguments formatting function
formatvarkw= (func)
  keyword arguments formatting function
formatvalue= (func)
  value formating functtion

Returns:
  formatted call signature

Return Type:
  str

Up

## getargvalues

getargvalues(frame)

Function to get information about arguments passed into a particular frame.

frame (frame)
  reference to a frame object to be processed

Returns:
  tuple of four things, where 'args' is a list of the argument names, 'varargs' and 'varkw' are the names of the * and ** arguments or None and 'locals' is the locals dictionary of the given frame.

Raises TypeError:
  raised if the input parameter is not a frame object

Up

## prepareJsonCommand

prepareJsonCommand(method, params)

Function to prepare a single command or response for transmission to the IDE.

method (str)
  command or response name to be sent
params (dict)
  dictionary of named parameters for the command or response

Returns:
  prepared JSON command or response string

Return Type:
  str

Up