import pdb
vals = list(range(1, 11))
for val in vals:
sum = 0
sum += val
pdb.set_trace()
print(sum) # 55?
# 터미널에서 실행하면
(Pdb) val
1
(Pdb) sum
1
(Pdb) c
> d:\_codefi\_python_workspace\study\test4.py(5)<module>()
-> for val in vals:
(Pdb) val
2
(Pdb) sum
2
(Pdb) quit
import pdb
print("one")
pdb.set_trace()
print("two")
print("three")
# 터미널에서 실행하면
one
-> print("two")
(Pdb) n
two
# 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)
댓글 영역