(case_setup_remote)
| 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 | ) |
| 3051 | def 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.") |
nothing calls this directly
no test coverage detected