PyCharm - 某些断点在Django项目中不起作用 [英] PyCharm - some breakpoints not working in a Django project

查看:1543
本文介绍了PyCharm - 某些断点在Django项目中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在PyCharm中看到一些奇怪的行为。我有一个Django项目,其中断点停止在某些文件中工作,而不是其他文件。例如,我应用程序的views.py中的所有断点工作正常,但同一应用程序的models.py中的所有断点都被忽略。



我尝试了以下但不喜欢:




  • 双重检查断点被启用

  • 删除/重新添加断点

  • 关闭/重新打开项目


  • 删除我的配置并创建一个新的



/ p>


  • PyCharm 2.7.3

  • Python 2.7.2(在virtualenv内)

  • Django 1.5.1



我没有在配置中使用任何特殊设置。任何想法?

解决方案

虽然我不知道为什么或如何,通过删除.idea目录解决了问题。在Django项目目录下。这是PyCharm项目数据所在的地方,因此删除该目录将会丢失您的项目特定设置,因此只需要注意。希望这有助于别人。


I'm seeing some bizarre behaviour in PyCharm. I have a Django project where breakpoints stopped working in some files but not others. For example, all the breakpoints in my app's views.py work fine, but all the breakpoints in that same app's models.py are just ignored.

I've tried the following but no joy:

  • double-check the breakpoints are enabled
  • removing/re-adding the breakpoints
  • closed/re-opened the project
  • quit & re-launch PyCharm
  • delete my configuration and create a new one

Some details:

  • PyCharm 2.7.3
  • Python 2.7.2 (within virtualenv)
  • Django 1.5.1

I'm not using any special settings in my configuration. Any ideas?

解决方案

While I don't know why or how, the problem was resolved by deleting the ".idea" directory within the Django project directory. This is where the PyCharm project data lives, so by removing this directory you will lose your project specific settings, so just be aware. Hope this helps someone else.

这篇关于PyCharm - 某些断点在Django项目中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆