python - 如何跳过 Python 调试器 (pdb) 中的列表理解?

标签 python list-comprehension pdb

pdb 中,next 指令不会跳过列表推导,而是逐步完成每次迭代。有没有办法跳过它们,以便在列表理解后的下一行继续调试?

我不得不求助于列出代码,在下一行设置断点,然后继续执行到下一个断点。这很烦人,我想一定有更好的方法。

最佳答案

您可以使用 until 命令。 pdbhelp 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/

相关文章:

Python:并行执行cat子进程

python - 我怎么弄乱了python pdb

python - 调试一个类似 "hangs"的 python 应用程序

haskell - 列表理解 : making lists of lists

python - 高级嵌套列表理解语法

python - 为什么 Python 要求列表理解中的子句是错误的?

python 脚本上的 Python pdb 作为包运行

python - Tkinter StringVar 获取所选选项的索引

python - Pandas 0.19 : Attribute error "unknown property color_cycle" still exists while performing boxplot

python - Pandas 等级函数产生非整数?