0
votes

I'm trying to debug a Django project in PyCharm. I've set a breakpoint at the point where Django tells me that the exception is coming from. When I hit debug though, the break point turns grey, and the debugger doesn't catch it.

Greyed out break point

But this is exactly the line which is causing the error, it you believe my stack trace.

Traceback:

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: []

I've enabled every option that might be causing execution to not stop

Option selected Even more options

And I've tried removing the .idea file.

Does anyone have any idea about why PyCharm isn't recognising this break point?

1

1 Answers

1
votes

When your breakpoint are marked as gray, that means that they are muted. To unmute them, you should look for the button "Mute Breakpoints" in the debug console.

This icon is a breakpoint marked with a tilted line.