Nice programing

Python 디버거, pdb 시작하기

nicepro 2020. 10. 14. 20:55
반응형

Python 디버거, pdb 시작하기


도구 상자 pdb (Python 디버거) 를 추가하고 싶습니다 . 시작하는 가장 좋은 방법은 무엇입니까?


다음은 Python 디버거를 시작하는 데 필요한 리소스 목록입니다.

  1. Steve Ferb의 기사 "Debugging in Python" 읽기
  2. Eric Holscher의 스크린 캐스트 "Using pdb, the Python Debugger" 시청
  3. pdb에 대한 Python 문서 읽기 — Python 디버거
  4. Karen Tracey의 Django 1.1 테스트 및 디버깅 의 9 장 — 무엇을 기록해야할지 모를 때 : 디버거 사용 —을 읽으십시오 .

개요:

# epdb1.py -- experiment with the Python debugger, pdb
import pdb
a = "aaa"
pdb.set_trace()
b = "bbb"
c = "ccc"
final = a + b + c
print final

이제 스크립트를 실행하십시오.

$ python epdb1.py
(Pdb) p a
'aaa'
(Pdb)

참고 URL : https://stackoverflow.com/questions/4228637/getting-started-with-the-python-debugger-pdb

반응형