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

Method _on_run

_pydevd_bundle/pydevd_comm.py:339–355  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

337
338 @overrides(PyDBDaemonThread._on_run)
339 def _on_run(self):
340 try:
341 pydev_log.info("Watching directories for code reload:\n---\n%s\n---" % ("\n".join(sorted(self.watch_dirs))))
342
343 # i.e.: The first call to set_tracked_paths will do a full scan, so, do it in the thread
344 # too (after everything is configured).
345 self.watcher.set_tracked_paths(self.watch_dirs)
346 while not self._kill_received:
347 for change_enum, change_path in self.watcher.iter_changes():
348 # We're only interested in modified events
349 if change_enum == fsnotify.Change.modified:
350 pydev_log.info("Modified: %s", change_path)
351 self.api.request_reload_code(self.py_db, -1, None, change_path)
352 else:
353 pydev_log.info("Ignored (add or remove) change in: %s", change_path)
354 except:
355 pydev_log.exception("Error when waiting for filesystem changes in FSNotifyThread.")
356
357 @overrides(PyDBDaemonThread.do_kill_pydev_thread)
358 def do_kill_pydev_thread(self):

Callers

nothing calls this directly

Calls 6

infoMethod · 0.80
set_tracked_pathsMethod · 0.80
iter_changesMethod · 0.80
request_reload_codeMethod · 0.80
exceptionMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected