{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/9"}],"enrichment":{"capability":"Attaches a Python debugger (pdb) to long-running processes without restarting them, allowing interactive inspection and control via a socket connection.","skillfed_tags":["remote-debugging","posix-only"],"use_cases":["Debug a long-running batch job or service without restarting it to see what state it is in.","Inspect variables and execution flow in a production-like environment while the process continues running.","Troubleshoot deadlocks or hangs in multi-threaded or async code by pausing and examining the call stack.","Develop and test a daemon or background worker by attaching a debugger on demand without stopping the service."],"what_it_does":"pdb-attach is a remote debugger that lets you pause and inspect a long-running Python process without stopping it. You set it up by importing the module and calling `listen()` with a port number in your application code; when the process is running, you connect from another terminal using the process ID and port, and interact with pdb as usual. When done, you detach and the process continues.\n\nThe package uses signals and sockets to communicate between the debugger and the running process. It is POSIX-only (no Windows support) and requires that you instrument your code with pdb-attach before the process starts\u2014you cannot attach to an arbitrary running Python process. The documentation warns that the socket is unauthenticated, so a local attacker could potentially connect and execute code as your user; planned features aim to mitigate this, but they are not yet implemented.","worth_installing":"Yes, if you are on POSIX and willing to instrument your code with pdb-attach before deployment. It solves a real problem\u2014interactive debugging of long-running processes\u2014that standard pdb cannot handle. The dormant maintenance status and lack of active security mitigations are acceptable for development and testing environments, but the unauthenticated socket and Windows incompatibility limit its scope. Install if you need remote debugging for a POSIX-based service or batch job."},"id":"pdb-attach","links":{"html":"https://skillfed.io/packages/pdb-attach","md":"https://skillfed.io/packages/pdb-attach.md","pypi":"https://pypi.org/project/pdb-attach/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2023-09-23","license_spdx":null,"license_treatment":"permissive","name":"pdb-attach","python_support":"supports_current","summary":"A python debugger that can attach to running processes."},"popularity":{"monthly_downloads":700571,"position":5293,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"3.0.1"}
