(self, set_as_global=True)
| 573 | dont_terminate_child_pids = set() |
| 574 | |
| 575 | def __init__(self, set_as_global=True): |
| 576 | if set_as_global: |
| 577 | pydevd_tracing.replace_sys_set_trace_func() |
| 578 | |
| 579 | self.authentication = _Authentication() |
| 580 | |
| 581 | self.reader = None |
| 582 | self.writer = None |
| 583 | self._fsnotify_thread = None |
| 584 | self.created_pydb_daemon_threads = {} |
| 585 | self._waiting_for_connection_thread = None |
| 586 | self._on_configuration_done_event = ThreadingEvent() |
| 587 | self.check_alive_thread = None |
| 588 | self.py_db_command_thread = None |
| 589 | self.quitting = None |
| 590 | self.cmd_factory = NetCommandFactory() |
| 591 | self._cmd_queue = defaultdict(_queue.Queue) # Key is thread id or '*', value is Queue |
| 592 | self._thread_events = defaultdict(ThreadingEvent) # Key is thread id or '*', value is Event |
| 593 | self.suspended_frames_manager = SuspendedFramesManager() |
| 594 | self._files_filtering = FilesFiltering() |
| 595 | self.timeout_tracker = TimeoutTracker(self) |
| 596 | |
| 597 | # Note: when the source mapping is changed we also have to clear the file types cache |
| 598 | # (because if a given file is a part of the project or not may depend on it being |
| 599 | # defined in the source mapping). |
| 600 | self.source_mapping = SourceMapping(on_source_mapping_changed=self._clear_caches) |
| 601 | |
| 602 | # Determines whether we should terminate child processes when asked to terminate. |
| 603 | self.terminate_child_processes = True |
| 604 | |
| 605 | # Determines whether we should try to do a soft terminate (i.e.: interrupt the main |
| 606 | # thread with a KeyboardInterrupt). |
| 607 | self.terminate_keyboard_interrupt = False |
| 608 | |
| 609 | # Set to True after a keyboard interrupt is requested the first time. |
| 610 | self.keyboard_interrupt_requested = False |
| 611 | |
| 612 | # These are the breakpoints received by the PyDevdAPI. They are meant to store |
| 613 | # the breakpoints in the api -- its actual contents are managed by the api. |
| 614 | self.api_received_breakpoints = {} |
| 615 | |
| 616 | # These are the breakpoints meant to be consumed during runtime. |
| 617 | self.breakpoints = {} |
| 618 | self.function_breakpoint_name_to_breakpoint = {} |
| 619 | |
| 620 | # Set communication protocol |
| 621 | PyDevdAPI().set_protocol(self, 0, PydevdCustomization.DEFAULT_PROTOCOL) |
| 622 | |
| 623 | self.variable_presentation = PyDevdAPI.VariablePresentation() |
| 624 | |
| 625 | # mtime to be raised when something that will affect the |
| 626 | # tracing in place (such as breakpoints change or filtering). |
| 627 | self.mtime = 0 |
| 628 | |
| 629 | self.file_to_id_to_line_breakpoint = {} |
| 630 | self.file_to_id_to_plugin_breakpoint = {} |
| 631 | |
| 632 | # Note: breakpoints dict should not be mutated: a copy should be created |
no test coverage detected