Skip to main content

rpcpdb

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-2015 Ben Bass <benbass@codedstructure.net> All rights reserved.

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

Metadata

Release files for rpcpdb 0.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rpcpdb 0.4.5
File Size Uploaded
rpcpdb-0.4.5.tar.gz 12.9 kB Details

Release files / rpcpdb-0.4.5.tar.gz

Download URL rpcpdb-0.4.5.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e56a55446c837f865f2c317acfb1b1f8e02d1ac92ca1de442a930a5a2b1cfbad
BLAKE2b-256 checksum
How to use checksums
8552bd06263411fa97fa832a3fa5c040bfd1375e3ed8b85e9c1702b6a794ab85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.4.5 This release

1 release file

0.4.4

2 release files

0.4.3

2 release files

0.4.2

1 release file

0.4.1

2 release files

0.4

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3

1 release file

0.2.1

1 release file

0.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page