(case_setup_dap)
| 3289 | |
| 3290 | @pytest.mark.skipif(IS_JYTHON, reason="Not Jython compatible (fails on set variable).") |
| 3291 | def test_pause_and_continue(case_setup_dap): |
| 3292 | with case_setup_dap.test_file("_debugger_case_pause_continue.py") as writer: |
| 3293 | json_facade = JsonFacade(writer) |
| 3294 | |
| 3295 | json_facade.write_set_breakpoints(writer.get_line_index_with_content("Break here")) |
| 3296 | |
| 3297 | json_facade.write_make_initial_run() |
| 3298 | |
| 3299 | json_facade.wait_for_thread_stopped() |
| 3300 | |
| 3301 | json_facade.write_continue() |
| 3302 | |
| 3303 | json_facade.write_pause() |
| 3304 | |
| 3305 | json_hit = json_facade.wait_for_thread_stopped(reason="pause") |
| 3306 | |
| 3307 | stack_frame = next(iter(json_hit.stack_trace_response.body.stackFrames)) |
| 3308 | |
| 3309 | name_to_scope = json_facade.get_name_to_scope(stack_frame["id"]) |
| 3310 | frame_variables_reference = name_to_scope["Locals"].variablesReference |
| 3311 | |
| 3312 | set_variable_response = json_facade.write_set_variable(frame_variables_reference, "loop", "False") |
| 3313 | set_variable_response_as_dict = set_variable_response.to_dict()["body"] |
| 3314 | assert set_variable_response_as_dict == {"value": "False", "type": "bool", "variablesReference": 0} |
| 3315 | |
| 3316 | json_facade.write_continue() |
| 3317 | |
| 3318 | writer.finished_ok = True |
| 3319 | |
| 3320 | |
| 3321 | @pytest.mark.parametrize("stepping_resumes_all_threads", [False, True]) |
nothing calls this directly
no test coverage detected