How to execute multi-line statements within Python's own debugger (PDB)

后端 未结 6 1242
南旧
南旧 2020-12-07 07:06

So I am running a Python script within which I am calling Python\'s debugger, PDB by writing:

import ipdb; ipdb.set_trace()

(iPython\'s ver

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-07 07:17

    There is the special case if you want a couple of commands be executed when hitting a break point. Then there is the debugger command commands. It allows you to enter multiple lines of commands and then end the whole sequence with the end key word. More with (pdb) help commands.

提交回复
热议问题