在 pdb
中,next
指令不会跳过列表推导,而是逐步完成每次迭代。有没有办法跳过它们,以便在列表理解后的下一行继续调试?
我不得不求助于列出代码,在下一行设置断点,然后继续执行到下一个断点。这很烦人,我想一定有更好的方法。
最佳答案
您可以使用 until
命令。 pdb
中help until
的输出:
unt(il)
Continue execution until the line with a number greater than the current one is reached or until the current frame returns
关于python - 如何跳过 Python 调试器 (pdb) 中的列表理解?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6308569/