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

Function mark_thread_suspended

_pydevd_bundle/pydevd_thread_lifecycle.py:28–50  ·  view source on GitHub ↗
(thread, stop_reason: int, original_step_cmd: int = -1, main_suspend: bool = True)

Source from the content-addressed store, hash-verified

26
27
28def mark_thread_suspended(thread, stop_reason: int, original_step_cmd: int = -1, main_suspend: bool = True):
29 pydev_log.info("Marking thread suspended. Name: %s, stop_reason: %s, main_suspend: %s", thread.name, stop_reason, main_suspend)
30 info = set_additional_thread_info(thread)
31 info.suspend_type = PYTHON_SUSPEND
32 if original_step_cmd != -1:
33 stop_reason = original_step_cmd
34 thread.stop_reason = stop_reason
35
36 # Note: don't set the 'pydev_original_step_cmd' here if unset.
37
38 if not main_suspend:
39 info.pydev_step_cmd = CMD_THREAD_SUSPEND
40 info.pydev_step_stop = None
41 elif info.pydev_step_cmd == -1:
42 # If the step command is not specified, set it to step into
43 # to make sure it'll break as soon as possible.
44 info.pydev_step_cmd = CMD_STEP_INTO
45 info.pydev_step_stop = None
46
47 # Mark as suspended as the last thing.
48 info.pydev_state = STATE_SUSPEND
49 info.update_stepping_info()
50 return info
51
52
53def internal_run_thread(thread, set_additional_thread_info):

Callers 3

set_suspendMethod · 0.90
suspend_all_threadsFunction · 0.85

Calls 3

infoMethod · 0.80
update_stepping_infoMethod · 0.80

Tested by

no test coverage detected