在Spyder中设置断点无效

3

我很新手,正在学习Python和Spyder。我使用的是Python 3.5和Spyder 2.3.8。我想要调试我的代码并设置断点。但在内部控制台中出现了以下错误:

    Traceback (most recent call last): 
      File "C:\Anaconda3\lib\site-packages\spyderlib\plugins\externalconsole.py", line 713, in set_spyder_breakpoints
         shellwidget.shell.set_spyder_breakpoints()    
    AttributeError: 'TerminalWidget' object has no attribute 'set_spyder_breakpoints'

当我运行代码时,断点被忽略了。有什么解决方法吗?谢谢!


你通过conda安装了Spyder吗? - Leb
@Leb 是的,我安装了Anaconda,Spyder也包含在其中。 - Bec
1个回答

8

当我想要断点被考虑时,我经常忘记启动我的代码:

  • 通过 Ctrl + F5 图标(蓝色箭头+双横杠),

  • 而不是通常的 F5 (绿色箭头)。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接