From df742656a901283f8af5a042f029fb64d069fc5b Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Mon, 5 Mar 2018 14:57:00 -0800 Subject: [PATCH] Remove breakpoints from files specified in path --- ptvsd/wrapper.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ptvsd/wrapper.py b/ptvsd/wrapper.py index ff8f98247..87f414514 100644 --- a/ptvsd/wrapper.py +++ b/ptvsd/wrapper.py @@ -849,9 +849,10 @@ def on_setBreakpoints(self, request, args): # First, we must delete all existing breakpoints in that source. cmd = pydevd_comm.CMD_REMOVE_BREAK for pyd_bpid, vsc_bpid in self.bp_map.pairs(): - msg = 'python-line\t{}\t{}'.format(path, vsc_bpid) - self.pydevd_notify(cmd, msg) - self.bp_map.remove(pyd_bpid, vsc_bpid) + if pyd_bpid[0] == path: + msg = 'python-line\t{}\t{}'.format(path, vsc_bpid) + self.pydevd_notify(cmd, msg) + self.bp_map.remove(pyd_bpid, vsc_bpid) cmd = pydevd_comm.CMD_SET_BREAK msgfmt = '{}\tpython-line\t{}\t{}\tNone\t{}\tNone'