_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Python Debugging — techniky a nástroje

21. 10. 2025 1 min read intermediate

Print debugging funguje, ale je pomalé. Breakpointy, step-through, profiling — profesionální nástroje pro profesionální debugování.

breakpoint() — vestavěný debugger

def process_data(items): for item in items: result = transform(item) breakpoint() # Zastaví zde — pdb prompt save(result)

pdb příkazy: n(ext), s(tep), c(ontinue), p(rint) var, l(ist), q(uit)

VS Code debugging

// .vscode/launch.json { “configurations”: [{ “name”: “Python: Current File”, “type”: “debugpy”, “request”: “launch”, “program”: “${file}”, “console”: “integratedTerminal” }] }

Profiling

cProfile

python -m cProfile -s cumulative myapp.py

line_profiler

@profile def slow_function(): …

kernprof -l -v myapp.py

Key Takeaway

breakpoint() pro quick debug, VS Code pro step-through, cProfile pro performance. Přestaňte používat print().

pythondebuggingpdbprofiling
Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.