(pyfile, run, target, breakpoint)
| 13 | @pytest.mark.parametrize("run", runners.all_launch) |
| 14 | @pytest.mark.parametrize("target", targets.all_named) |
| 15 | def test_stop_on_entry(pyfile, run, target, breakpoint): |
| 16 | @pyfile |
| 17 | def code_to_debug(): |
| 18 | from debuggee import backchannel # @bp |
| 19 | |
| 20 | backchannel.send("done") |
| 21 | |
| 22 | with debug.Session() as session: |
| 23 | session.config["stopOnEntry"] = True |
| 24 | |
| 25 | backchannel = session.open_backchannel() |
| 26 | with run(session, target(code_to_debug)): |
| 27 | if breakpoint: |
| 28 | session.set_breakpoints(code_to_debug, all) |
| 29 | |
| 30 | if breakpoint: |
| 31 | stop = session.wait_for_stop( |
| 32 | "breakpoint", expected_frames=[some.dap.frame(code_to_debug, "bp")] |
| 33 | ) |
| 34 | session.request("next", {"threadId": stop.thread_id}) |
| 35 | stop = session.wait_for_stop( |
| 36 | "step", expected_frames=[some.dap.frame(code_to_debug, 3)] |
| 37 | ) |
| 38 | else: |
| 39 | session.wait_for_stop( |
| 40 | "entry", expected_frames=[some.dap.frame(code_to_debug, 1)] |
| 41 | ) |
| 42 | |
| 43 | session.request_continue() |
| 44 | assert backchannel.receive() == "done" |
nothing calls this directly
no test coverage detected
searching dependent graphs…