MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / on_breakpoints_changed

Method on_breakpoints_changed

pydevd.py:1175–1192  ·  view source on GitHub ↗

When breakpoints change, we have to re-evaluate all the assumptions we've made so far.

(self, removed=False)

Source from the content-addressed store, hash-verified

1173 pydevd_tracing.SetTrace(None)
1174
1175 def on_breakpoints_changed(self, removed=False):
1176 """
1177 When breakpoints change, we have to re-evaluate all the assumptions we've made so far.
1178 """
1179 if not self.ready_to_run:
1180 # No need to do anything if we're still not running.
1181 return
1182
1183 self.mtime += 1
1184 if not removed:
1185 # When removing breakpoints we can leave tracing as was, but if a breakpoint was added
1186 # we have to reset the tracing for the existing functions to be re-evaluated.
1187
1188 # The caches also need to be cleared because of django breakpoints use case,
1189 # where adding a file needs to start tracking a context which was previously
1190 # untracked.
1191 self._clear_caches()
1192 self.set_tracing_for_untraced_contexts(breakpoints_changed=True)
1193
1194 def set_tracing_for_untraced_contexts(self, breakpoints_changed=False):
1195 # Enable the tracing for existing threads (because there may be frames being executed that

Calls 2

_clear_cachesMethod · 0.95

Tested by

no test coverage detected