티스토리 뷰

Python

pdb

techbard 2016.05.09 21:54

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)


댓글
댓글쓰기 폼
공지사항
Total
407,537
Today
11
Yesterday
19
«   2019/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
글 보관함