【问题标题】:How to have color errors AND launch into the ipython debugger after an error when starting from the command line?从命令行启动时出现错误后如何出现颜色错误并启动到 ipython 调试器?
【发布时间】:2020-09-10 13:43:59
【问题描述】:

Vanilla python 允许你这样做:

python -m pdb -c c myscript.py

有没有办法用 IPython 做到这一点?

ipython -i myscript.py

除了它只是启动 IPython 而不是 IPython %debug 之外,几乎做了正确的事情。

我想要 IPython %pdb 的等价物,但来自命令行。我可能缺少一个标志。

【问题讨论】:

    标签: debugging ipython


    【解决方案1】:

    我错过了:

    ipython -i --pdb ./bibupdate.py mylibrary.bib
    

    -m pdb 不这样做。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-07
      • 2020-07-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多