Inspect a running Python process with py-spy
Use py-spy dump, top and record to see what a stuck or slow Python process is doing without restarting it, and grant the ptrace access it needs on Linux, Docker and Kubernetes.
Topic · 6 stories
6 stories tagged debugging on AI Tamer, newest first.
Use py-spy dump, top and record to see what a stuck or slow Python process is doing without restarting it, and grant the ptrace access it needs on Linux, Docker and Kubernetes.
Send breakpoint() calls to pdb, another debugger, a custom hook, or nowhere, by setting one environment variable instead of editing code.
Use curl --fail-with-body when a script needs to detect an HTTP error and keep the response text that explains it.
Turn a repeatable refactor failure into a search across commits. Use Git to narrow the range, then inspect the first failing change.
An ephemeral container gives you a way to inspect a running Kubernetes pod when its application image lacks a shell or diagnostic tools.
An outer error can explain what failed at its layer while keeping the lower-level cause available for diagnosis.