MCPcopy Index your code
hub / github.com/fabioz/PyDev.Debugger / test_attach_to_pid_halted

Function test_attach_to_pid_halted

tests_python/test_debugger.py:3051–3067  ·  view source on GitHub ↗
(case_setup_remote)

Source from the content-addressed store, hash-verified

3049 not IS_CPYTHON or IS_MAC or not SUPPORT_ATTACH_TO_PID or IS_PY312_OR_GREATER, reason="CPython only test (brittle on Mac)."
3050)
3051def test_attach_to_pid_halted(case_setup_remote):
3052 with case_setup_remote.test_file("_debugger_case_attach_to_pid_multiple_threads.py", wait_for_port=False) as writer:
3053 time.sleep(1) # Give it some time to initialize and get to the proper halting condition
3054 _attach_to_writer_pid(writer)
3055
3056 bp_line = writer.get_line_index_with_content("break thread here")
3057 writer.write_add_breakpoint(bp_line)
3058 writer.write_make_initial_run()
3059
3060 hit = writer.wait_for_breakpoint_hit(line=bp_line)
3061
3062 writer.write_change_variable(hit.thread_id, hit.frame_id, "wait", "False")
3063 writer.wait_for_var('<xml><var name="" type="bool"')
3064
3065 writer.write_run_thread(hit.thread_id)
3066
3067 writer.finished_ok = True
3068
3069
3070@pytest.mark.skipif(not IS_CPYTHON, reason="CPython only test.")

Callers

nothing calls this directly

Calls 8

test_fileMethod · 0.80
write_add_breakpointMethod · 0.80
write_change_variableMethod · 0.80
write_run_threadMethod · 0.80
_attach_to_writer_pidFunction · 0.70

Tested by

no test coverage detected