Series · 5 posts
Python Debugging
python 5
1
pdb 기본 사용법과 breakpoint() 빌트인 — 스크립트 디버깅
표준 라이브러리 pdb. breakpoint(), 핵심 명령, ipdb, postmortem.
2
debugpy 활용 — VSCode·PyCharm·원격 attach 통합
debugpy로 IDE 디버깅, 원격 프로세스 attach, justMyCode, 멀티프로세스.
3
asyncio 디버깅 — 짧은 콜스택과 slow callback 추적
코루틴 콜스택 추적, asyncio debug=True, slow callback, race condition.
4
py-spy 운영 분석 — 코드 수정 없이 프로세스 검사
py-spy로 콜스택 dump, 샘플링 프로파일링, flamegraph, 외부 attach.
5
Python faulthandler·tracemalloc·objgraph — 죽음과 누수 진단
세그폴트 트레이스백, 메모리 할당 추적, 객체 그래프 시각화.