Skip to main content
Travis-CI tests

Web-PDB is a web-interface for Python’s built-in PDB debugger. It allows to debug Python scripts remotely in a web-browser.

Features

  • Responsive design based on Bootstrap.

  • Python syntax highlighting with Prism (“Okaida” theme).

  • Supports all PDB features.

  • Standard input and output can be redirected to the web-console to interact with Python scripts remotely.

  • Current file box tracks current position in a file being executed. Red line numbers indicate breakpoints, if any.

  • Globals and Locals boxes show local and global variables in the current scope. Special variables that start and end with double underscores __ are excluded (you can always view them using PDB commands).

  • Human-readable Unicode literals for Python 2.

  • Command history that stores up to 10 last unique PDB commands (accessed by arrow UP/DOWN keys).

Web-PDB screenshot

Web-PDB console in Chrome browser

Usage

Install Web-PDB into your working Python environment:

pip install web-pdb

Insert the following line into your Python program at the point where you want to start debugging:

import web_pdb; web_pdb.set_trace()

The set_trace() call will suspend your program and open a web-UI at the default port 5555 (port value can be changed). Enter in your browser’s address bar: http://<your Python machine hostname or IP>:5555, for example http://monty-python:5555, and you should see the web-UI like the one on the preceding screenshot. Now you can use all PDB commands and features. Additional Current file, Globals and Locals information boxes help you better track your program runtime state.

Note: it is strongly recommended to work with the Web-PDB web-UI only in one browser session. With more than one browser window accessing the web-UI it can display incorrect data in one or more browser sessions.

Subsequent set_trace() calls can be used as hardcoded breakpoints.

Additionally, Web-PDB provides catch_post_mortem context manager that can catch unhandled exceptions raised within its scope and automatically start PDB post-mortem debugging session. For example:

import web_pdb

with web_pdb.catch_post_mortem():
    # Some error-prone code
    assert foo == bar, 'Oops!'

For more detailed info about the Web-PDB API read docstrings in the ./web_pdb/__init__.py file.

Compatibility

  • Python: 2.7, 3+

  • Browsers: Firefox, Chrome (all modern browsers should work)

License

MIT, see LICENSE.txt.

The debugger icon made by Freepik from www.flaticon.com is licensed by CC 3.0 BY.

Metadata

Release files for web-pdb 1.1.0

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

Source distribution (sdist)

Source distribution for web-pdb 1.1.0
File Size Uploaded
web-pdb-1.1.0.tar.gz 79.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for web-pdb 1.1.0
File Interpreter ABI Platform
web_pdb-1.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 165.1 kB

Release files / web-pdb-1.1.0.tar.gz

Download URL web-pdb-1.1.0.tar.gz
Size 79.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ff6478a744e8ead3679f61badbdba8e439d967d331290c318a20193c4ff93bdc
BLAKE2b-256 checksum
How to use checksums
8b27876815169fef77539baa045973976edc684fee5f3ad996d9a702f9abb8c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / web_pdb-1.1.0-py2.py3-none-any.whl

Download URL web_pdb-1.1.0-py2.py3-none-any.whl
Size 85.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6cfe7b3f94bf21ba73e0f7b26ce6a7a464aec6cc7614f2341976016b0e480c2b
BLAKE2b-256 checksum
How to use checksums
6b3fbec239fbf279a1fa87f9d594e2ea6c4eb3c5ca4648d071fa7917e1743e19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

2.0.1

2 release files

2.0.0

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.0

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

3 release files

1.3.1

3 release files

1.3.0

3 release files

1.2.2

3 release files

1.2.1

3 release files

1.2.0

3 release files

This release

1.1.0 This release

2 release files

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