{"id":13936753,"url":"https://github.com/romanvm/python-web-pdb","last_synced_at":"2026-01-17T10:16:22.057Z","repository":{"id":11115207,"uuid":"67953966","full_name":"romanvm/python-web-pdb","owner":"romanvm","description":"Web-based remote UI for Python's PDB debugger","archived":false,"fork":false,"pushed_at":"2024-10-24T11:07:39.000Z","size":2485,"stargazers_count":504,"open_issues_count":14,"forks_count":46,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-11-14T14:45:58.331Z","etag":null,"topics":["debugger","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romanvm.png","metadata":{"files":{"readme":"Readme.rst","changelog":"Changelog.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-11T20:57:40.000Z","updated_at":"2024-11-07T08:14:03.000Z","dependencies_parsed_at":"2024-01-12T03:36:21.855Z","dependency_job_id":"78df72d6-61e3-43fa-998b-96f49225dc90","html_url":"https://github.com/romanvm/python-web-pdb","commit_stats":{"total_commits":387,"total_committers":7,"mean_commits":"55.285714285714285","dds":0.6020671834625323,"last_synced_commit":"ffc2bbe0a259a8cbc5075ba16b65e4528972a0aa"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanvm%2Fpython-web-pdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanvm%2Fpython-web-pdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanvm%2Fpython-web-pdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanvm%2Fpython-web-pdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romanvm","download_url":"https://codeload.github.com/romanvm/python-web-pdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226686730,"owners_count":17666928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugger","python"],"created_at":"2024-08-07T23:02:57.899Z","updated_at":"2026-01-17T10:16:17.034Z","avatar_url":"https://github.com/romanvm.png","language":"Python","readme":"Web-PDB\n#######\n\n.. image:: https://github.com/romanvm/python-web-pdb/actions/workflows/tests.yml/badge.svg\n  :target: https://github.com/romanvm/python-web-pdb/actions/workflows/tests.yml\n  :alt: GitHub Action tests\n.. image:: https://badge.fury.io/py/web-pdb.svg\n  :target: https://badge.fury.io/py/web-pdb\n  :alt: PyPI version\n\nWeb-PDB is a web-interface for Python's built-in `PDB`_ debugger.\nIt allows to debug Python scripts remotely in a web-browser.\n\nImportant Notice\n================\n\nCurrently this project is in a minimum maintenance mode.\nIt means that I will try to maintain compatibility with new Python versions and address\ncritical issues, if any arise. But at the moment I have no time or resources to develop\nnew features or properly review external contributions. That is why only pull requests\nwith bug fixes will be prioritized. Other issues or pull requests may or may not be reviewed or accepted.\n\nFeatures\n========\n\n- Responsive design based on `Bootstrap`_.\n- Python syntax highlighting with `Prism`_ (\"Okaida\" theme).\n- Supports all PDB features.\n- Standard input and output can be redirected to the web-console\n  to interact with Python scripts remotely.\n- **Current file** box tracks current position in a file being executed.\n  Red line numbers indicate breakpoints, if any.\n- **Globals** and **Locals** boxes show local and global variables in the current scope.\n  Special variables that start and end with double underscores ``__`` are excluded\n  (you can always view them using PDB commands).\n- Command history that stores up to 10 last unique PDB commands (accessed by arrow UP/DOWN keys).\n\n.. figure:: https://raw.githubusercontent.com/romanvm/python-web-pdb/master/screenshot.png\n  :alt: Web-PDB screenshot\n  :width: 640px\n  :height: 490px\n\n  *Web-PDB console in Chrome browser*\n\nUsage\n=====\n\nInstall Web-PDB into your working Python environment::\n\n  pip install web-pdb\n\nInsert the following line into your Python program at the point where you want\nto start debugging:\n\n.. code-block:: python\n\n  import web_pdb; web_pdb.set_trace()\n\nThe ``set_trace()`` call will suspend your program and open a web-UI at the default port ``5555``\n(port value can be changed). Enter in your browser's address bar:\n``http://\u003cyour Python machine hostname or IP\u003e:5555``,\nfor example ``http://monty-python:5555``,\nand you should see the web-UI like the one on the preceding screenshot.\nNow you can use all PDB commands and features. Additional **Current file**, **Globals**\nand **Locals** information boxes help you better track your program runtime state.\n\n**Note**: it is strongly recommended to work with the Web-PDB web-UI only in one browser session.\nWith more than one browser window accessing the web-UI it may display incorrect data in one or more\nbrowser sessions.\n\nSubsequent ``set_trace()`` calls can be used as hardcoded breakpoints.\n\nWeb-PDB is compatible with the new `breakpoint()`_ function added in Python 3.7.\nSet environment variable ``PYTHONBREAKPOINT=\"web_pdb.set_trace\"`` to launch Web-PDB\nwith ``breakpoint()``.\n\nAdditionally, Web-PDB provides ``catch_post_mortem`` context manager that can catch\nunhandled exceptions raised within its scope and automatically start PDB post-mortem debugging session.\nFor example:\n\n.. code-block:: python\n\n  import web_pdb\n\n  with web_pdb.catch_post_mortem():\n      # Some error-prone code\n      assert foo == bar, 'Oops!'\n\nFor more detailed info about the Web-PDB API read docstrings in the ``./web_pdb/__init__.py`` file.\n\nThe ``inspect`` Command\n-----------------------\n\nWeb-PDB provides ``inspect`` or ``i`` command that is not present in the original PDB.\nThis command outputs the list of object's members along with their values.\nSyntax: ``inspect \u003cobject_name\u003e`` or ``i \u003cobject_name\u003e``.\n\nSpecial members with names enclosed in double underscores (``__``) are ignored.\n\nConsiderations for Multithreading and Multiprocessing Programs\n==============================================================\nMultithreading\n--------------\n\nWeb-PDB maintains one debugger instance that traces only one thread. You should not call ``set_trace()``\nfrom different threads to avoid race conditions. Each thread needs to be debugged separately one at a time.\n\nMultiprocessing\n---------------\n\nEach process can have its own debugger instance provided you call ``set_trace`` with a different port value\nfor each process. This way you can debug each process in a separate browser tab/window.\nTo simplify this you can use ``set_trace(port=-1)`` to select a random port between 32768 and 65536.\n\nCompatibility\n=============\n\n- **Python**: 3.6+\n- **Browsers**: Firefox, Chrome (all modern browsers should work)\n\nLicense\n=======\n\nMIT, see ``LICENSE.txt``.\n\nThe debugger icon made by `Freepik`_ from `www.flaticon.com`_ is licensed by `CC 3.0 BY`_.\n\n.. _PDB: https://docs.python.org/3.6/library/pdb.html\n.. _Bootstrap: http://getbootstrap.com\n.. _Prism: http://prismjs.com/\n.. _Freepik: http://www.freepik.com\n.. _www.flaticon.com: http://www.flaticon.com\n.. _CC 3.0 BY: http://creativecommons.org/licenses/by/3.0/\n.. _breakpoint(): https://docs.python.org/3/library/functions.html#breakpoint\n","funding_links":[],"categories":["Python","\u003ca id=\"324874bb7c3ead94eae6f1fa1af4fb68\"\u003e\u003c/a\u003eDebug\u0026\u0026调试"],"sub_categories":["\u003ca id=\"d22bd989b2fdaeda14b64343b472dfb6\"\u003e\u003c/a\u003e工具"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromanvm%2Fpython-web-pdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromanvm%2Fpython-web-pdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromanvm%2Fpython-web-pdb/lists"}