提问人:Aiza Danayal 提问时间:10/18/2023 更新时间:10/18/2023 访问量:14
将 Python PDB 库导入 Jupyter Notebook,返回 ipdb 提示符,但不显示确切的错误代码行
importing python pdb library to jupyter notebook, returns ipdb prompt but doesnt show the exact error code line
问:
我正在 jupyter notebook 中编写我的 python 代码。当我尝试通过导入 pdb 库并在代码中编写 pdb.set_trace() 并运行它来调试代码时,我只收到 ipdb 提示符,它允许我打印和查看变量值,但不允许我看到断点和确切的代码行有错误。我无法使用 n,c 函数。
我尝试过使用 breakpoint() 和 %debug,但它是一样的,我仍然没有得到可以逐步运行代码并查看错误所在位置的交互式位。
答: 暂无答案
上一个:条件断点失败
评论
.ipynb
%run script_name_here.py