python-debugpy
यह क्या करती है
यह स्किल एजेंट को Python के बिल्ट-इन debugger और remote debugger से Python प्रोग्राम में बग ढूँढना सिखाती है। यह उन डेवलपर्स के लिए है जो ऐसी समस्या में फँसे हैं जो print statements से नहीं दिखती।
कब इस्तेमाल करें
- ✓जब कोई Python प्रोग्राम गलत नतीजे देता है और कारण छिपा है।
- ✓जब कोई Python टेस्ट ऐसे फ़ेल होता है जिसे आप समझा नहीं पा रहे।
- ✓जब कोई Python सेवा दूसरी मशीन पर चलती है या उलझे क्रम में शुरू होती है और debugger जोड़ना पड़ता है।
Skill का लिंक
https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/python-debugpy/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी Python स्क्रिप्ट गलत total देती है। मुझे चरण-दर-चरण चलाकर दिखाइए कि कौन-सी value गलत होती है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट काम के लिए सबसे सरल debugger चुनता है और सही लाइन पर प्रोग्राम रोकता है ताकि variables जाँच सके। चल रहे प्रोग्राम के लिए वह स्थानीय पोर्ट पर remote debugger जोड़ता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Python Debugging
Use when Python code needs interactive debugging: hidden locals, confusing state mutation, failing tests, subprocesses, long-running services, or remote attach.
Choose the smallest debugger that reaches the bad frame:
breakpoint(): local code where source edits are acceptable.python3 -m pdb: launch from the beginning without editing source.python3 -m pdb -c continue: stop at an unhandled exception.debugpy: remote/headless processes, DAP clients, an existing PID, or startup races.
Commands
python3 -m pdb path/to/script.py arg1
python3 -m pdb -c continue path/to/script.py
python3 -c "import debugpy" || python3 -m pip install debugpy
python3 -m debugpy --listen 127.0.0.1:5678 --wait-for-client path/to/script.py
python3 -m debugpy --listen 127.0.0.1:5678 --wait-for-client -m package.module
python3 -m debugpy --listen 127.0.0.1:5678 --pid <pid>
Source-edit attach:
import debugpy
debugpy.listen(("127.0.0.1", 5678))
debugpy.wait_for_client()
debugpy.breakpoint()
Post-mortem inspection:
import pdb
import sys
try:
run()
except Exception:
pdb.post_mortem(sys.exc_info()[2])
raise
pdb commands
- Flow:
n,s,r,c,q. - Stack and source:
w,u,d,a,l,ll. - Values:
p expr,pp expr,display expr. - Breakpoints:
b file.py:42,b func,b file.py:42, condition,cl <num>. - Evaluate or mutate:
!statement; full REPL:interact.
Rules
- Reproduce with the smallest command or test first.
- Disable parallel test workers for pdb; worker pools usually break interactive stdin.
- Keep
debugpyin the active environment. Do not add it as a project dependency unless the project needs it. - Bind debug servers to
127.0.0.1; expose them only on an isolated network or through a secure tunnel. - Treat PID attach as process injection. Avoid security-sensitive or production targets unless explicitly approved.
- On Linux, check ptrace and container privileges before changing a target when PID attach fails.
- Before committing, run
rg -n 'breakpoint\\(|pdb\\.set_trace|debugpy\\.' --type pyand remove accidental breakpoints. - Rerun the normal project test gate without the debugger.
अक्सर पूछे जाने वाले सवाल
क्या मुझे अपना कोड बदलना होगा?
हमेशा नहीं। स्किल प्रोग्राम को बिना बदले debugger में शुरू कर सकती है, हालाँकि स्थानीय काम में सोर्स में breakpoint लाइन लगती है।
क्या यह पहले से चल रहे प्रोग्राम को डिबग कर सकती है?
हाँ। debugger किसी चल रही प्रोसेस से उसके ID से जुड़ सकता है।
post-mortem debugging क्या है?
यह तब debugger खोलता है जब प्रोग्राम क्रैश होता है, ताकि आप उस समय की स्थिति जाँच सकें।
जानकारी
लेखक का मूल विवरण
Debug Python with pdb, breakpoint(), post-mortem inspection, and debugpy remote or headless attach.
repo: EKKOLearnAI/ekko-studio
लोकप्रियता
- GitHub स्टार
- 12k
- रैंकिंग में स्थान
- #11575
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
1password
12kयह आपके एजेंट को 1Password CLI से कमांड और कॉन्फ़िग फ़ाइलों के लिए सीक्रेट लेने में मदद करती है, बिना उन्हें चैट, लॉग या सेव फ़ाइलों में दिखाए।
apple-notes
12kयह आपके एजेंट को Mac पर memo कमांड लाइन टूल से Apple Notes बनाने, खोजने, पढ़ने, बदलने, ले जाने या मिटाने में मदद करती है।
apple-reminders
12kयह आपके एजेंट को Mac पर remindctl टूल से Apple Reminders और रिमाइंडर लिस्ट देखने, बनाने, बदलने, पूरा करने या मिटाने में मदद करती है।
document-to-action-items
12kयह आपके एजेंट को दस्तावेज़, मीटिंग ट्रांस्क्रिप्ट या नोट्स से कार्यों, ज़िम्मेदारों, समय-सीमाओं और फ़ैसलों की साफ़ तालिका बनाने में मदद करती है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।