AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Python Debugging

skill-caraya-agent-skills-python-debugging · by caraya

Python debugging skill for pdb/debugpy setup, GIL and async debugging, and import/traceback analysis. Trigger phrases: Python debug, pdb breakpoint, GIL contention, asyncio hang, import error, traceback, memory profile, debugpy.

No reviews yet
0 installs
42 views
0.0% view→install

Install

$ agentstack add skill-caraya-agent-skills-python-debugging

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-caraya-agent-skills-python-debugging)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Python Debugging? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Python Debugging

Use When

  • Debugging Python code with pdb or debugpy.
  • Investigating GIL contention and threading issues.
  • Analyzing asyncio hangs and event loop problems.
  • Resolving import errors and circular dependencies.

Setup and Tools

  1. Interactive debugging
  • pdb: Built-in; use breakpoint() (Python 3.7+) or import pdb; pdb.set_trace().
  • debugpy: Remote debugging for complex setups; integrate with VS Code.
  • ipdb: Enhanced pdb with better UI; drop-in replacement for pdb.
  1. Profiling and inspection
  • cProfile: python -m cProfile -s cumulative script.py for CPU profiling.
  • memory_profiler: @profile decorator and python -m memory_profiler script.py for line-by-line memory.
  • py-spy: Sampling profiler; attach to running process without instrumentation.
  • objgraph: Visualize object references and detect leaks.
  1. Async debugging
  • Enable asyncio debug mode: asyncio.run(..., debug=True) or PYTHONASYNCDEBUG=1.
  • Use asyncio.Event.wait() with timeouts to detect hangs.
  • Check for lost tasks: asyncio.all_tasks() to list live coroutines.

Checklist

  1. Exception handling and tracebacks
  • Read the full traceback: start at the bottom (where the error happened).
  • Look for import errors early in the chain; they often mask the real issue.
  • Check if an exception is being caught and re-raised with different context.
  1. GIL and threading
  • GIL-bound operations (CPU-heavy, NumPy) cannot parallelize with threads; use processes instead.
  • Use threading.Lock() or multiprocessing.Lock() correctly; deadlocks if not released.
  • Monitor thread count with threading.enumerate() to detect leaked threads.
  1. Asyncio debugging
  • Look for gather() or create_task() without proper cancellation.
  • Ensure all tasks are awaited before program exit; orphans cause "Task was destroyed but it is pending" warnings.
  • Use debug=True to get backtraces for long-running tasks.
  1. Import and module issues
  • Use python -v to trace import resolution and detect circular dependencies.
  • Check if __init__.py is present in package folders.
  • Verify sys.path includes the expected directories: import sys; print(sys.path).

Output Requirements

For each finding provide:

  • Issue summary
  • Traceback or profiling evidence
  • Root cause (threading, async, import, GIL)
  • Steps to debug with pdb or profiler
  • Fix strategy

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.