From db40e5d9544ebfabfa0917fb35241643ccb391a6 Mon Sep 17 00:00:00 2001 From: fabioz Date: Mon, 28 Jan 2019 17:52:10 -0200 Subject: [PATCH] Remove breakpoints from all mappings. Fixes #1126 --- .../_vendored/pydevd/_pydevd_bundle/pydevd_api.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_api.py b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_api.py index cf53a13d9..481ce14b0 100644 --- a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_api.py +++ b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_api.py @@ -289,8 +289,18 @@ def remove_all_breakpoints(self, py_db, filename): Removes all the breakpoints from a given file or from all files if filename == '*'. ''' changed = False - for file_to_id_to_breakpoint in [ - py_db.file_to_id_to_line_breakpoint, py_db.file_to_id_to_plugin_breakpoint]: + lst = [ + py_db.file_to_id_to_line_breakpoint, + py_db.file_to_id_to_plugin_breakpoint, + py_db.breakpoints + ] + if hasattr(py_db, 'django_breakpoints'): + lst.append(py_db.django_breakpoints) + + if hasattr(py_db, 'jinja2_breakpoints'): + lst.append(py_db.jinja2_breakpoints) + + for file_to_id_to_breakpoint in lst: if filename == '*': if file_to_id_to_breakpoint: file_to_id_to_breakpoint.clear()