我试图在PyCharm中调试Django项目。我在Django告诉我异常来自的地方设置了一个断点。当我点击调试时,断点变为灰色,调试器无法捕获它。
但这正是导致错误的行,你相信我的堆栈跟踪。
回溯:
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
39. response = get_response(request)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
217. response = self.process_exception_by_middleware(e, request)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
215. response = response.render()
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/response.py" in render
109. self.content = self.rendered_content
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/response.py" in rendered_content
86. content = template.render(context, self._request)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/backends/django.py" in render
66. return self.template.render(context)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/base.py" in render
208. return self._render(context)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/base.py" in _render
199. return self.nodelist.render(context)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/loader_tags.py" in render
174. return compiled_parent._render(context)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/base.py" in _render
199. return self.nodelist.render(context)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/defaulttags.py" in render
315. return nodelist.render(context)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/template/defaulttags.py" in render
439. url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/urls/base.py" in reverse
91. return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
File "/Users/ThatOtherBatman/anaconda/envs/ProjectFoo/lib/python3.5/site-packages/django/urls/resolvers.py" in _reverse_with_prefix
392. (lookup_view_s, args, kwargs, len(patterns), patterns)
Exception Type: NoReverseMatch at /Bar/login/
Exception Value: Reverse for 'dashboard' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
我已启用可能导致执行不能停止的每个选项
我已尝试删除.idea
文件。
有没有人知道为什么PyCharm没有认识到这个断点?
答案 0 :(得分:1)
当您的断点标记为灰色时,表示它们已静音。要取消静音,您应该在调试控制台中查找“静音断点”按钮。
此图标是标有倾斜线的断点。