Skip to main content

Debug support for RPC servers

Project description

A PDB wrapper designed to be part of RPC systems for remote introspection and debugging of RPC server state

Features

  • debug any API function from the client side

  • store a trace file from any API function

  • open an interactive console into the RPC process

  • match and ignore count on function breakpoints

  • Python 2 and 3 support

About

rpcpdb supports three main functions to support debugging of RPC contexts:
  • a wrapper around the pdb debugger with stdio routed over a UNIX socket

  • tracing of API functions

  • an interactive console available within the target RPC process

It is designed to fulfil the need to debug a function on an already-running server which uses threads or processes to dispatch each remote procedure call, without having to change the source code to the server in any way. There is no disruption to other clients and rpc calls while the selected call is being debugged or traced.

In particular, a mixin class is provided which adds a small number of debug and trace methods to your RPC server. These allow breakpoints to be controlled by another RPC client.

For an example, run the xmlrpc_server.py server process, then run one or more xmlrpc_client.py processes which will continually perform RPC requests against it. xmlrpc_debug.py can then be run to inject a debug breakpoint in a method which the clients are continually calling; the next client to call that function will be remotely debuggable, while other clients carry on oblivious.

An alternative example added in v0.2 is the ‘test_server.py’ which does not use RPC but runs functions in background threads. It gives a good overview of usage in a single module without extra dependencies.

Currently the debug interface is provided via a UNIX socket, but this will be extended in future.

RPC framework support is intended to cover XMLRPC, RPyC and Pyro in the initial stages.

Plans

  • Update examples, tidy up, document.

  • Support other interfaces than termsock / UNIX socket.

  • Support json-rpc

  • Improve API tracing functionality

License information

Copyright (c) 2010-2013 Ben Bass <benbass@codedstructure.net> All rights reserved.

See the file “LICENSE” for information terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rpcpdb-0.4.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rpcpdb-0.4.1-py27-none-any.whl (18.0 kB view details)

Uploaded Python 2.7

File details

Details for the file rpcpdb-0.4.1.tar.gz.

File metadata

  • Download URL: rpcpdb-0.4.1.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rpcpdb-0.4.1.tar.gz
Algorithm Hash digest
SHA256 da52b51431ae94838116ca87519665835a9dee598e32eaad01866d800d1c75a6
MD5 6da54d18b922def4befe4fb8c9219245
BLAKE2b-256 15af837d92b1a1ab1c28841eec71915c79d1936b439bcc8cb7a2c9d5092ebb1a

See more details on using hashes here.

File details

Details for the file rpcpdb-0.4.1-py27-none-any.whl.

File metadata

File hashes

Hashes for rpcpdb-0.4.1-py27-none-any.whl
Algorithm Hash digest
SHA256 d6581aafa6713d31ac3d594cc4289d9e767ae2c47ca1f046caff6b85f18ebb9a
MD5 de9d2ccc27fe5d92361c7a8e0a74d6d1
BLAKE2b-256 c8f8fe34e89dcc99e7450548c81da95d0a82b33088cbfd8053fc16ad7087d4cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page