From f7cd8b1fd9ff52d6c21f402426eaac1935c0f33b Mon Sep 17 00:00:00 2001 From: Elizaveta Shashkova Date: Thu, 6 Apr 2017 14:43:49 +0300 Subject: [PATCH] Breakpoints are skipped in templates included with Django 1.10 (PY-23338) Make condition for skipping rendering file less strict, because sometimes the same context is responsible for rendering more than one template. --- python/helpers/pydev/pydevd_plugins/django_debug.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/python/helpers/pydev/pydevd_plugins/django_debug.py b/python/helpers/pydev/pydevd_plugins/django_debug.py index 32daa83ff324..f50d3db84fd9 100644 --- a/python/helpers/pydev/pydevd_plugins/django_debug.py +++ b/python/helpers/pydev/pydevd_plugins/django_debug.py @@ -332,18 +332,15 @@ def _is_django_exception_break_context(frame): #======================================================================================================================= def can_not_skip(plugin, main_debugger, pydb_frame, frame): - if main_debugger.django_breakpoints and _is_django_render_call(frame): - filename = _get_template_file_name(frame) - django_breakpoints_for_file = main_debugger.django_breakpoints.get(filename) - if django_breakpoints_for_file: - return True - return False + return main_debugger.django_breakpoints and _is_django_render_call(frame) + def has_exception_breaks(plugin): if len(plugin.main_debugger.django_exception_break) > 0: return True return False + def has_line_breaks(plugin): for file, breakpoints in dict_iter_items(plugin.main_debugger.django_breakpoints): if len(breakpoints) > 0: