Suppressing ipdb output in Spyder iPython interpreter

蹲街弑〆低调 提交于 2019-12-11 05:41:33

问题


I have reason to believe that my iPython interpreter is causing my kernel to die and restart similar to the issues logged in this link and that link.

The latter link indicates that the error is caused by the fact that the debugger outputs step-by-step ipdb content into the interpreter. One user reported that the behavior stopped when he (and I quote)

disabled logging to console before running in debug mode

How does one "disable logging to console" in Spyder IDE/IPython? I really need to do this so I can at least step through my code....

EDIT

I would like to suppress this kind of output

ipdb> > d:\temp\other const models\plaxis\output\plotparfile.py(16)PlotParFile()
     14     with open(filename,'r') as fid:
     15         lines = fid.readlines()
---> 16     fid.close()
     17     #split first line get header and pop it out
     18     header = lines[0].split()

> d:\temp\other const models\plaxis\output\plotparfile.py(18)PlotParFile()
     16     fid.close()
     17     #split first line get header and pop it out
---> 18     header = lines[0].split()
     19     lines.pop(0)
     20 

回答1:


(Spyder developer here) That output is generated automatically and its purpose is to tell you where are you placed in your code while debugging.

Right now there are no options in Spyder to deactivate it. Besides, I really doubt that output could be the cause of any kernel failures.



来源:https://stackoverflow.com/questions/44308115/suppressing-ipdb-output-in-spyder-ipython-interpreter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!