Why is debugging in eclipse/pydev so slow for my python program?

白昼怎懂夜的黑 提交于 2019-11-30 13:40:18

Here is a good enough workaround, based on Mikko Ohtamaa's hint. I just verified the following on my Mac Air:

  • If I simply close the 'Variables' window in the Eclipse GUI, I can single step through the code at normal speed. Which is great, but, uh, I don't have the Variables window.
  • For any variable I want to see, I can hover my cursor over the variable and see the value. I didn't attempt to hover over my large dictionary that is the culprit here.
  • I can also right-click on any variable and add a 'Watch', which brings up an 'Expressions' window. In this case the variable is just a degenerate case (very simple case) of an 'expression.

So, the workaround for me is to close the Eclipse Variable window, and use the Expressions window to selectively view variables. A pain, but for the debugging I'm doing it is better than pdb.

I simply commented this line out:

np.set_printoptions(threshold = 'nan')

It seems eclipse is trying to keep up with too much information.

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