Step into subroutine call, but not calls made for parameters

前端 未结 2 1648
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-27 04:42
func(a(), b.c)

When executing the line above in the pdb debugger, using step will actually step into a, and then into the get

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-27 05:15

    I would handle this by setting a break at the line number inside func that you're interested in, and then use continue. For example suppose your code looks like this:

    110  def func(a1, a2):
    111      "" docstring ""
    112      first interesting line
    

    then do this:

    python -m pdb caller.py
    pdb> b 112
    pdb> c
    

提交回复
热议问题