ããã°ã©ãã³ã°ã«ãããŠããã°ã¯é¿ããŠéããªãååšã§ããç¹ã«è€éãªã¢ããªã±ãŒã·ã§ã³ãéçºããŠãããšãäºæãã¬ãšã©ãŒãæå³ããªãåäœã«ééããããšã¯æ¥åžžè¶é£¯äºã§ãããããããªæã匷åãªå³æ¹ãšãªãã®ãããããã¬ãã§ããPythonã«ã¯æšæºã§pdb
ãšãããããã¬ãä»å±ããŠããŸãããããèŠèŠçã§äœ¿ãããããããã¬ãæ±ãã声ãå°ãªããããŸããã
ããã§ç»å Žããã®ã PuDB ã§ãïŒð PuDBã¯ãã¿ãŒããã«ïŒCUIïŒäžã§åäœãããã«ã¹ã¯ãªãŒã³ã®ããžã¥ã¢ã«ãããã¬ã§ããGUIããŒã¹ã®ãããã¬ãæã€ãããªèŠèŠçãªåããããããšãããŒããŒãäžå¿ã®è»œå¿«ãªæäœæ§ãäž¡ç«ãããŠããã®ã倧ããªç¹åŸŽã§ãããã®èšäºã§ã¯ãPuDBã®é åãã€ã³ã¹ããŒã«æ¹æ³ãåºæ¬çãªäœ¿ãæ¹ããå¿çšçãªãã¯ããã¯ãŸã§ã詳ãã解説ããŠãããŸãã
PuDBãšã¯ïŒ ãªãPuDBãéžã¶ã®ãïŒ
PuDBã¯ãAndreas Kloeckneræ°ã«ãã£ãŠéçºããããªãŒãã³ãœãŒã¹ã®Pythonãããã¬ã§ãããã®ååã¯ãPython Urwid Debuggerãã®ç¥ã§ãã³ã³ãœãŒã«UIã©ã€ãã©ãªã§ããurwid
ãšãã·ã³ã¿ãã¯ã¹ãã€ã©ã€ãã©ã€ãã©ãªpygments
ãå©çšããŠæ§ç¯ãããŠããŸãã
PuDBãå€ãã®éçºè ã«éžã°ããçç±ã¯ã以äžã®ãããªç¹åŸŽã«ãããŸãã
- èŠèŠçãªã€ã³ã¿ãŒãã§ãŒã¹: ãœãŒã¹ã³ãŒããã¹ã¿ãã¯ãã¬ãŒã¹ãå€æ°ããã¬ãŒã¯ãã€ã³ãã1ã€ã®ç»é¢ã«ãŸãšããŠè¡šç€ºããããªã¢ã«ã¿ã€ã ã§æŽæ°ãããŸããããã«ãããããã°ã©ã ã®ç¶æ ãäžç®ã§ææ¡ã§ããŸããð
- ããŒããŒããã¬ã³ããªãŒ: ã»ãšãã©ã®æäœãåäžããŒã®ã·ã§ãŒãã«ããã§å®è¡ã§ããŸããVimã©ã€ã¯ãªããŒãã€ã³ãããµããŒãããŠãããããŒããŒãæäœã«æ £ããŠããéçºè ã«ãšã£ãŠã¯éåžžã«å¹ççã§ããâšïž
- 軜éã»é«é: CUIããŒã¹ã§ãããããGUIãããã¬ãšæ¯èŒããŠè»œéã§ãåäœã軜快ã§ãããªã¢ãŒããµãŒããŒããªãœãŒã¹ãéãããç°å¢ã§ã®ãããã°ã«ãé©ããŠããŸããðš
- é«æ©èœ: æ¡ä»¶ä»ããã¬ãŒã¯ãã€ã³ããå€æ°ã®è©³çŽ°è¡šç€ºïŒå±é/æãããã¿ïŒããŠã©ããåŒããã¹ãã¢ãŒãã ïŒäºåŸïŒãããã°ãå¥ã¿ãŒããã«ããã®å¶åŸ¡ãIPythoné£æºãªã©ããããã°ã«å¿ èŠãªæ©èœãäžéãæã£ãŠããŸããð ïž
- ã«ã¹ã¿ãã€ãºæ§: ããŒãïŒããŒã¯ããŒãå«ãïŒã®å€æŽãã衚瀺é ç®ã®ã«ã¹ã¿ãã€ãºãå¯èœã§ããèªå奜ã¿ã®ãããã°ç°å¢ãæ§ç¯ã§ããŸããðš
æšæºã®pdb
ã¯ã·ã³ãã«ã§ãããã³ãã³ããèŠããå¿
èŠããããããã°ã©ã ã®ç¶æ
ãææ¡ããã«ã¯éœåºŠã³ãã³ããå
¥åããå¿
èŠããããŸããäžæ¹ãIDEã«çµ±åããããããã¬ã¯é«æ©èœã§ãããIDEèªäœãéãã£ãããç¹å®ã®ç°å¢ã§ãã䜿ããªãã£ããããå ŽåããããŸããPuDBã¯ããããã®ããŒã«ã®è¯ããšãããåãå
¥ããã¿ãŒããã«äžã§å®çµããå¹ççãªãããã°äœéšãæäŸããŸãã
ã€ã³ã¹ããŒã«
PuDBã®ã€ã³ã¹ããŒã«ã¯éåžžã«ç°¡åã§ããpipã³ãã³ãã䜿çšããŸãã
pip install pudb
ããPython 3ç°å¢ã§pip
ãPython 2ãæããŠããå Žåã¯ãpip3
ã䜿çšããŠãã ããã
pip3 install pudb
ããã§ã€ã³ã¹ããŒã«ã¯å®äºã§ããäŸåã©ã€ãã©ãªã§ãã urwid
ã pygments
ãèªåçã«ã€ã³ã¹ããŒã«ãããŸãã
çŸåšã®PuDBã¯Python 3.8以äžãå¿
èŠã§ãïŒ2024.1.3æç¹ïŒãå€ãPythonããŒãžã§ã³ïŒPython 2.7ã3.6ãªã©ïŒã䜿çšããŠããå Žåã¯ãæ§ããŒãžã§ã³ã®PuDBïŒäŸãã° pudb==2019.2
ïŒãã€ã³ã¹ããŒã«ããå¿
èŠããããŸãã
åºæ¬çãªäœ¿ãæ¹
PuDBãèµ·åããã«ã¯ãäž»ã«2ã€ã®æ¹æ³ããããŸãã
1. ã¹ã¯ãªããå šäœãPuDBã§å®è¡ãã
ãããã°ãããPythonã¹ã¯ãªããïŒäŸ: `my_script.py`ïŒãã`python -m pudb` ã³ãã³ãã§å®è¡ããŸãã
python -m pudb my_script.py [åŒæ°...]
ãŸãã¯ãPuDBã®ããŒãžã§ã³ã«ãã£ãŠã¯ïŒç¹ã«å€ãããŒãžã§ã³ïŒã以äžã®ã³ãã³ã圢åŒã䜿ãããŠããŸããã
python -m pudb.run my_script.py [åŒæ°...]
ãããã¯ã`pudb` ã³ãã³ãïŒPython 3ç°å¢ã§ã¯ `pudb3` ãšãªãããšããããŸãïŒã«ã¹ã¯ãªãããã¡ã€ã«ãæž¡ãæ¹æ³ããããŸãã
pudb my_script.py [åŒæ°...]
ããã«ãããã¹ã¯ãªããã®æåã®å®è¡è¡ã§PuDBãèµ·åãããããã°ã»ãã·ã§ã³ãéå§ãããŸãã
ð¡ Tips: è€æ°ã®PythonããŒãžã§ã³ãã€ã³ã¹ããŒã«ãããŠããç°å¢ã§ã¯ãæå³ããPythonã€ã³ã¿ããªã¿ã§PuDBãèµ·åããŠããã確èªããŸããããäŸãã°ãç¹å®ã®PythonããŒãžã§ã³ïŒäŸ: `/usr/bin/python3.9`ïŒã§å®è¡ãããå Žåã¯ã以äžã®ããã«æ瀺çã«æå®ããŸãã
/usr/bin/python3.9 -m pudb my_script.py
2. ã³ãŒãå ã«ãã¬ãŒã¯ãã€ã³ããæ¿å ¥ãã
ãããã°ãéå§ãããç¹å®ã®ç®æã«ã以äžã®ã³ãŒããæ¿å ¥ããŸãã
import pudb; pudb.set_trace()
ãããã¯ãPython 3.7以éã䜿çšããŠããå Žåã¯ãããã·ã³ãã«ã«çµã¿èŸŒã¿ã® `breakpoint()` é¢æ°ã䜿çšã§ããŸããPuDBãã€ã³ã¹ããŒã«ãããŠããã°ã`breakpoint()` ã¯èªåçã«PuDBãèµ·åããŸãïŒç°å¢å€æ° `PYTHONBREAKPOINT` ãèšå®ãããŠããªãå ŽåïŒã
breakpoint() # Python 3.7+
ãã®ã³ãŒããåã蟌ãŸããã¹ã¯ãªãããéåžžéãå®è¡ãããšã`set_trace()` ãŸã㯠`breakpoint()` ãåŒã³åºãããè¡ã§å®è¡ãäžæåæ¢ããPuDBã®ç»é¢ã衚瀺ãããŸãã
â ïž æ³šæ: `set_trace()` ã `breakpoint()` ãã³ãŒãã«æ®ãããŸãŸã³ãããããããæ¬çªç°å¢ã«ãããã€ãããããªãããã«æ³šæããŸãããããããã°ãå®äºãããå¿ ãåé€ããããæ¡ä»¶ä»ãã§å®è¡ãããããã«ããŠãã ããã
PuDBã®ç»é¢æ§æ
PuDBãèµ·åãããšãã¿ãŒããã«ã以äžã®ãããªé åã«åå²ãããç»é¢ã«åãæ¿ãããŸãã
- å·ŠåŽ (Source Code): çŸåšå®è¡äžã®ãœãŒã¹ã³ãŒãã衚瀺ãããŸããã·ã³ã¿ãã¯ã¹ãã€ã©ã€ããé©çšãããå®è¡è¡ã匷調衚瀺ãããŸãã
- å³åŽäžéš (Variables): çŸåšã®ã¹ã³ãŒãïŒããŒã«ã«å€æ°ãã°ããŒãã«å€æ°ïŒã«ããå€æ°ã®ãªã¹ããšãã®å€ã衚瀺ãããŸããå€ã¯ãªã¢ã«ã¿ã€ã ã§æŽæ°ãããŸãã
- å³åŽäžéš (Stack): çŸåšã®ã³ãŒã«ã¹ã¿ãã¯ïŒé¢æ°ã®åŒã³åºãå±¥æŽïŒã衚瀺ãããŸãã
- å³åŽäžéš (Breakpoints): èšå®ãããŠãããã¬ãŒã¯ãã€ã³ãã®äžèŠ§ã衚瀺ãããŸãã
ç»é¢äžéšã«ã¯ãçŸåšã®ç¶æ ããã³ãã衚瀺ãããããšããããŸãã
äž»èŠãªããŒæäœãšæ©èœ
PuDBã®æäœã¯ããŒããŒãã§è¡ããŸãã以äžã«äž»èŠãªããŒãšãã®æ©èœããŸãšããŸãã
ã㌠| 説æ | ã«ããŽãª |
---|---|---|
n |
次ã®è¡ãžã¹ããããªãŒããŒå®è¡ (é¢æ°ã®äžã«ã¯å ¥ããªã) | å®è¡å¶åŸ¡ |
s |
次ã®è¡ãžã¹ãããã€ã³å®è¡ (é¢æ°ã®äžã«å ¥ã) | å®è¡å¶åŸ¡ |
c |
次ã®ãã¬ãŒã¯ãã€ã³ããŸãã¯ããã°ã©ã çµäºãŸã§å®è¡ãç¶ç¶ | å®è¡å¶åŸ¡ |
r |
çŸåšã®é¢æ°ãçµäºãããŸã§å®è¡ (Return) | å®è¡å¶åŸ¡ |
t |
ã«ãŒãœã«ãããè¡ãŸã§å®è¡ (Run To Cursor) | å®è¡å¶åŸ¡ |
b |
ã«ãŒãœã«ãããè¡ã«ãã¬ãŒã¯ãã€ã³ããèšå®/è§£é€ | ãã¬ãŒã¯ãã€ã³ã |
B (Shift + b) |
ãã¬ãŒã¯ãã€ã³ããŠã£ã³ããŠã«ãã©ãŒã«ã¹ã移å | ãŠã£ã³ããŠæäœ |
V (Shift + v) |
å€æ°ãŠã£ã³ããŠã«ãã©ãŒã«ã¹ã移å | ãŠã£ã³ããŠæäœ |
S (Shift + s) |
ã¹ã¿ãã¯ãŠã£ã³ããŠã«ãã©ãŒã«ã¹ã移å | ãŠã£ã³ããŠæäœ |
C (Shift + c) |
ãœãŒã¹ã³ãŒããŠã£ã³ããŠã«ãã©ãŒã«ã¹ã移å | ãŠã£ã³ããŠæäœ |
Ctrl + x |
ãœãŒã¹ã³ãŒããŠã£ã³ããŠãšã³ãã³ãã©ã€ã³ãåãæ¿ã | ãŠã£ã³ããŠæäœ |
? |
ãã«ãç»é¢ã衚瀺 (ããŒãã€ã³ãäžèŠ§) | ãã«ã |
q |
ãããã¬ãçµäº (Quit) ãŸãã¯ãªã¹ã¿ãŒã | çµäº |
o |
ããã°ã©ã ã®æšæºåºåç»é¢ã衚瀺/é衚瀺 | 衚瀺 |
m |
ã¢ãžã¥ãŒã«ãã©ãŠã¶ãéã (ããŒãæžã¿ã¢ãžã¥ãŒã«ã®è¡šç€ºãæ°èŠããŒãããªããŒã) | ããã²ãŒã·ã§ã³ |
L |
æå®ããè¡çªå·ãžç§»å | ããã²ãŒã·ã§ã³ |
/ |
ãœãŒã¹ã³ãŒãå ãåæ¹æ€çŽ¢ | æ€çŽ¢ |
? (Shift + /) |
ãœãŒã¹ã³ãŒãå ãåŸæ¹æ€çŽ¢ | æ€çŽ¢ |
. |
次ã®æ€çŽ¢çµæãžç§»å (åæ¹) | æ€çŽ¢ |
, |
åã®æ€çŽ¢çµæãžç§»å (åŸæ¹) | æ€çŽ¢ |
k / â |
ã«ãŒãœã«ãäžã«ç§»å | ããã²ãŒã·ã§ã³ |
j / â |
ã«ãŒãœã«ãäžã«ç§»å | ããã²ãŒã·ã§ã³ |
h / â |
ã«ãŒãœã«ãå·Šã«ç§»å / å€æ°ãã¹ã¿ãã¯ãæãããã | ããã²ãŒã·ã§ã³ |
l / â |
ã«ãŒãœã«ãå³ã«ç§»å / å€æ°ãã¹ã¿ãã¯ãå±éãã | ããã²ãŒã·ã§ã³ |
g / Home |
ãã¡ã€ã«ã®å é è¡ãžç§»å | ããã²ãŒã·ã§ã³ |
G (Shift + g) / End |
ãã¡ã€ã«ã®æçµè¡ãžç§»å | ããã²ãŒã·ã§ã³ |
PageUp |
1ããŒãžäžã«ã¹ã¯ããŒã« | ããã²ãŒã·ã§ã³ |
PageDown |
1ããŒãžäžã«ã¹ã¯ããŒã« | ããã²ãŒã·ã§ã³ |
! |
Pythonã·ã§ã« (REPL) ãèµ·åãçŸåšã®ã³ã³ããã¹ãã§ã³ãŒããå®è¡ã§ããã | å®è¡ |
Ctrl + p |
èšå®ç»é¢ãéã (ããŒãã衚瀺ãªãã·ã§ã³ãªã©) | èšå® |
ãããã®ããŒæäœã«æ
£ããããšã§ãããŠã¹ã䜿ããã«é«éãªãããã°ãå¯èœã«ãªããŸããç¹ã« n
, s
, c
, b
ã¯ãããã°ã®åºæ¬ãšãªãæäœãªã®ã§ãæåã«èŠãããšè¯ãã§ãããã
é«åºŠãªæ©èœ
PuDBã¯åºæ¬çãªã¹ãããå®è¡ããã¬ãŒã¯ãã€ã³ãèšå®ä»¥å€ã«ããå€ãã®äŸ¿å©ãªæ©èœãæäŸããŠããŸãã
æ¡ä»¶ä»ããã¬ãŒã¯ãã€ã³ã
ç¹å®ã®æ¡ä»¶ãæºãããããšãã ãå®è¡ãåæ¢ããããå ŽåããããŸããäŸãã°ããã«ãŒãå€æ° `i` ã 5 ã«ãªã£ããšãã ãæ¢ãããããšãã£ãã±ãŒã¹ã§ãã
- ç®çã®è¡ã«ã«ãŒãœã«ãåãããŠ
b
ãæŒããéåžžã®ãã¬ãŒã¯ãã€ã³ããèšå®ããŸãã B
(Shift + b) ãæŒããŠãã¬ãŒã¯ãã€ã³ããŠã£ã³ããŠã«ãã©ãŒã«ã¹ã移åããŸãã- èšå®ããããã¬ãŒã¯ãã€ã³ããéžæãã
Enter
ãæŒããŸãã - ãã¬ãŒã¯ãã€ã³ãç·šéç»é¢ã衚瀺ãããã®ã§ããConditionãã®é
ç®ã«ç§»åãã
Enter
ãæŒããŸãã - æ¡ä»¶åŒïŒäŸ:
i == 5
ïŒãå ¥åããEnter
ãæŒããŸãã OK
ãéžæããŠEnter
ãæŒããŸãã
ããã§ãæå®ããæ¡ä»¶ãç (True) ã«ãªã£ããšãã®ã¿ããã®ãã¬ãŒã¯ãã€ã³ãã§å®è¡ãåæ¢ããŸãã
å€æ°ã®è©³çŽ°è¡šç€ºãšãŠã©ããåŒ
å€æ°ãŠã£ã³ã㊠(V
ã§ãã©ãŒã«ã¹) ã§ã¯ããªã¹ããèŸæžããªããžã§ã¯ããªã©ã®è€åçãªå€æ°ã®å
容ãå±éããŠç¢ºèªã§ããŸããå€æ°ãéžæã㊠l
(ãŸã㯠â
) ãæŒããšå±éãh
(ãŸã㯠â
) ãæŒããšæããããŸããŸããEnter
ããŒãæŒããšãå€æ°ã®è¡šçŸåœ¢åŒïŒrepr, strãªã©ïŒãå€æŽãããªãã·ã§ã³ã衚瀺ãããŸãã
ãŸããç¹å®ã®åŒã®å€ãåžžã«ç£èŠãããå Žåã¯ãããŠã©ããåŒ (Watch expressions)ãæ©èœã䟿å©ã§ããã³ãã³ãã©ã€ã³ (Ctrl + x
ã§åãæ¿ã) 㧠`watch <åŒ>` ãšå
¥åããããèšå®ç»é¢ (Ctrl + p
) ããè¿œå ã§ããŸãããŠã©ããåŒã¯å€æ°ãŠã£ã³ããŠã®äžéšã«è¡šç€ºãããã¹ãããå®è¡ããšã«å€ãæŽæ°ãããŸãã
ã¹ã¿ãã¯ãã¬ãŒã¹ã®ç¢ºèª
ã¹ã¿ãã¯ãŠã£ã³ã㊠(S
ã§ãã©ãŒã«ã¹) ã§ã¯ãçŸåšã®é¢æ°åŒã³åºãå±¥æŽã確èªã§ããŸããäžäžããŒã§ã¹ã¿ãã¯ãã¬ãŒã ãéžæãããšããœãŒã¹ã³ãŒããŠã£ã³ããŠãšå€æ°ãŠã£ã³ããŠã®å
容ããéžæãããã¬ãŒã ã®ã³ã³ããã¹ãã«åãæ¿ãããŸããããã«ãããåŒã³åºãå
ã®é¢æ°ã®ç¶æ
ãç°¡åã«ç¢ºèªã§ããŸãã
ãã¹ãã¢ãŒãã ãããã°
ããã°ã©ã ãäŸå€ïŒãšã©ãŒïŒã§ã¯ã©ãã·ã¥ããå Žåããã®åå ã調æ»ããã®ã«åœ¹ç«ã€ã®ããã¹ãã¢ãŒãã ãããã°ã§ããã¹ã¯ãªããã `python -m pudb script.py` ã§å®è¡ããŠããå Žåããã£ãããããªãã£ãäŸå€ãçºçãããšèªåçã«PuDBãèµ·åããäŸå€ãçºçããæç¹ã®ç¶æ ãããããã°ãéå§ã§ããŸãã
ãããã¯ãäŸå€ãçºçããåŸã«æåã§ãã¹ãã¢ãŒãã ãããã°ãéå§ããããšãã§ããŸãã
import pudb
import sys
try:
# ... äŸå€ãçºçããå¯èœæ§ã®ããã³ãŒã ...
result = 1 / 0
except Exception:
# äŸå€ãçºçãããããã®æ
å ±ãå
ã«PuDBãèµ·å
pudb.post_mortem(sys.exc_info()[2])
ããã«ããããšã©ãŒçºçæã®å€æ°ã®å€ãã³ãŒã«ã¹ã¿ãã¯ã確èªããåå 究æã®æããããåŸãããšãã§ããŸããäŸå€çºçæã« e
ãæŒããšããã¬ãŒã¹ããã¯æ
å ±ã衚瀺ã§ããŸãã
Pythonã·ã§ã« (REPL) ã®å©çš
ãããã°äžã« !
ãæŒããšãçŸåšã®ã¹ã³ãŒãïŒå€æ°ãå®çŸ©ãããŠããç¶æ
ïŒã§Pythonã®å¯Ÿè©±ã·ã§ã«ãèµ·åããŸããããã§å€æ°ã®å€ãå€æŽããããä»»æã®Pythonã³ãŒããå®è¡ããŠåäœã確èªãããã§ããŸããIPythonãã€ã³ã¹ããŒã«ãããŠããã°ãããé«æ©èœãªIPythonã·ã§ã«ã䜿çšããããšãå¯èœã§ãïŒèšå®ãå¿
èŠãªå ŽåããããŸãïŒãã·ã§ã«ãçµäºããã«ã¯ `exit()` ãŸã㯠`Ctrl+d` ãå
¥åããŸãã
èšå®ã®ã«ã¹ã¿ãã€ãº
PuDBã®å€èŠ³ãåäœã¯ãèšå®ç»é¢ããã«ã¹ã¿ãã€ãºã§ããŸããCtrl + p
ãæŒããšèšå®ç»é¢ãéããŸãã
äž»ãªèšå®é ç®:
- Theme: ç»é¢ã®é è²ããŒããéžæããŸãã`dark` ã `light` ãå«ãããã€ãã®ããªã»ããããŒããçšæãããŠããŸãã`classic` ã¯äŒçµ±çãªè¡šç€ºã§ãã
- Line Numbers: ãœãŒã¹ã³ãŒãã«è¡çªå·ã衚瀺ãããã©ããã
- Show variable types: å€æ°ãŠã£ã³ããŠã§åæ å ±ã衚瀺ãããã©ããã
- Wrap lines: é·ãè¡ãæãè¿ããŠè¡šç€ºãããã©ããã
- Prompt on quit: çµäº (
q
) æã«ç¢ºèªããã³ããã衚瀺ãããã©ããã - Shell: `!` ã§èµ·åããã·ã§ã«ãæå®ããŸãïŒ`python` ãŸã㯠`ipython` ãªã©ïŒã
èšå®é
ç®ã¯äžäžããŒã§ç§»åããEnter
ãã¹ããŒã¹ããŒã§å€ãå€æŽããŸããå€æŽåŸãå³ç¢å°ããŒã§ OK
ã«ç§»åã Enter
ãæŒããšèšå®ãä¿åãããŸããèšå®å
容ã¯éåžž `~/.config/pudb/pudb.cfg` ã«ä¿åãããŸãã
PuDB vs pdb vs IDEãããã¬
ããã§ãPuDBãä»ã®ãããã°ããŒã«ãšæ¯èŒããŠã¿ãŸãããã
ç¹åŸŽ | PuDB | pdb (æšæº) | IDEããã㬠(VSCode, PyCharmãªã©) |
---|---|---|---|
ã€ã³ã¿ãŒãã§ãŒã¹ | CUI (ããžã¥ã¢ã«) | CUI (ã³ãã³ãã©ã€ã³) | GUI |
æäœæ§ | ããŒããŒãäžå¿ (é«é) | ã³ãã³ãå ¥å | ããŠã¹ & ããŒããŒã |
èŠèŠæ§ | é«ã (è€æ°ãã€ã³è¡šç€º) | äœã (ã³ãã³ãã§éœåºŠç¢ºèª) | éåžžã«é«ã |
軜éæ§ | é«ã | éåžžã«é«ã | äœã (IDEäŸå) |
ç°å¢äŸå | äœã (ã¿ãŒããã«ãããã°OK) | éåžžã«äœã | é«ã (IDEãå¿ èŠ) |
æ©èœ | è±å¯ | åºæ¬ç | éåžžã«è±å¯ (ãããã¡ã€ãªã³ã°çé£æº) |
åŠç¿ã³ã¹ã | äžçšåºŠ (ããŒæäœ) | äœãäžçšåºŠ (ã³ãã³ã) | äœãäžçšåºŠ (GUIæäœ) |
PuDBã®åŒ·ã¿: 軜éã§ãããªããèŠèŠçãªãããã°ãå¯èœã§ãããŒããŒãæäœã«ããå¹çæ§ãé«ãç¹ã§ãããªã¢ãŒããµãŒããŒãDockerã³ã³ããå ãªã©ãGUIã䜿ããªãç°å¢ã§ã®ãããã°ã«ç¹ã«åšåãçºæ®ããŸãã
pdbã®åŒ·ã¿: æšæºã©ã€ãã©ãªãªã®ã§ã€ã³ã¹ããŒã«äžèŠã§ãã©ããªç°å¢ã§ã確å®ã«äœ¿ããŸããéåžžã«ã·ã³ãã«ã§ãã
IDEãããã¬ã®åŒ·ã¿: GUIã«ããçŽæçãªæäœãšããšãã£ã¿ãä»ã®éçºããŒã«ãšã®ã·ãŒã ã¬ã¹ãªé£æºã§ããéåžžã«é«æ©èœã§ãããIDEã®ã»ããã¢ãããå¿ èŠã§ãã
ã©ã®ããŒã«ãéžã¶ãã¯ãéçºç°å¢ããããžã§ã¯ãã®æ§è³ªãå人ã®å¥œã¿ã«ãã£ãŠç°ãªããŸããPuDBã¯ãã¿ãŒããã«ã§ã®äœæ¥ã奜ã¿ãå¹çæ§ãéèŠããéçºè ã«ãšã£ãŠãéåžžã«é åçãªéžæè¢ãšãªãã§ããããâš
ãŸãšã
PuDBã¯ãPythonéçºè ã«ãšã£ãŠåŒ·åãªãããã°ããŒã«ã§ããCUIããŒã¹ã§ãããªãããã·ã³ã¿ãã¯ã¹ãã€ã©ã€ãããããœãŒã¹ã³ãŒããå€æ°ãã¹ã¿ãã¯ããã¬ãŒã¯ãã€ã³ãããªã¢ã«ã¿ã€ã ã§è¡šç€ºããèŠèŠçãªã€ã³ã¿ãŒãã§ãŒã¹ãæäŸãããããã°äœæ¥ã®å¹çãå€§å¹ ã«åäžãããŸããããŒããŒãã·ã§ãŒãã«ããã«ãã軜快ãªæäœæ§ãé åã§ãã
æšæºã®`pdb`ã§ã¯ç©è¶³ããªãããããIDEã®ãããã¬ã¯éãããããããã¯GUIã䜿ããªãç°å¢ã§ãããã°ãããããšãã£ãå Žåã«ãPuDBã¯æé©ãªãœãªã¥ãŒã·ã§ã³ãšãªãåŸãŸãã
ãã®èšäºãåèã«ããã²PuDBãå°å ¥ããŠãããå¿«é©ãªPythonãããã°ã©ã€ããéã£ãŠãã ããïŒðâ¡ïžâ
ã³ã¡ã³ã