Ich würde gerne wissen, wie man den debug
Befehl in Pdb verwenden?Wie verwende ich den Debug-Befehl in pdb (Python)
(Pdb) help
Documented commands (type help <topic>):
========================================
EOF c d h list q rv undisplay
a cl debug help ll quit s unt
alias clear disable ignore longlist r source until
args commands display interact n restart step up
b condition down j next return tbreak w
break cont enable jump p retval u whatis
bt continue exit l pp run unalias where
Miscellaneous help topics:
==========================
pdb exec
(Pdb) help debug
debug code
Enter a recursive debugger that steps through the code
argument (which is an arbitrary expression or statement to be
executed in the current environment).
(Pdb) debug print('hello')
ENTERING RECURSIVE DEBUGGER
> <string>(1)<module>()->None
((Pdb)) n
hello
--Return--
> <string>(1)<module>()->None
((Pdb)) n
LEAVING RECURSIVE DEBUGGER
(Pdb)
Dank @Shaon, aber ich verstehe, wie mit Python debuggen, aber es gibt einen Befehl 'debug '(siehe Hilfe Befehl), die ich nicht verstehe. Haben Sie ein Beispiel dafür, wie Sie den Befehl 'debug' verwenden? –