Install
$ agentstack add skill-caraya-agent-skills-python-debugging ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
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 →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
- Interactive debugging
- pdb: Built-in; use
breakpoint()(Python 3.7+) orimport 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.
- Profiling and inspection
- cProfile:
python -m cProfile -s cumulative script.pyfor CPU profiling. - memory_profiler:
@profiledecorator andpython -m memory_profiler script.pyfor line-by-line memory. - py-spy: Sampling profiler; attach to running process without instrumentation.
- objgraph: Visualize object references and detect leaks.
- Async debugging
- Enable asyncio debug mode:
asyncio.run(..., debug=True)orPYTHONASYNCDEBUG=1. - Use
asyncio.Event.wait()with timeouts to detect hangs. - Check for lost tasks:
asyncio.all_tasks()to list live coroutines.
Checklist
- 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.
- GIL and threading
- GIL-bound operations (CPU-heavy, NumPy) cannot parallelize with threads; use processes instead.
- Use
threading.Lock()ormultiprocessing.Lock()correctly; deadlocks if not released. - Monitor thread count with
threading.enumerate()to detect leaked threads.
- Asyncio debugging
- Look for
gather()orcreate_task()without proper cancellation. - Ensure all tasks are awaited before program exit; orphans cause "Task was destroyed but it is pending" warnings.
- Use
debug=Trueto get backtraces for long-running tasks.
- Import and module issues
- Use
python -vto trace import resolution and detect circular dependencies. - Check if
__init__.pyis present in package folders. - Verify
sys.pathincludes 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.
- Author: caraya
- Source: caraya/agent-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.