Skip to content

Commit

Permalink
Remove breakpoints from all mappings. Fixes microsoft#1126
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Jan 28, 2019
1 parent 26cc6b0 commit db40e5d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit db40e5d

Please sign in to comment.