| 957 | return StopInfo(stopped, frames, tid, fid) |
| 958 | |
| 959 | def wait_for_next_subprocess(self): |
| 960 | message = self.timeline.wait_for_next( |
| 961 | timeline.Event("debugpyAttach") | timeline.Request("startDebugging") |
| 962 | ) |
| 963 | if isinstance(message, timeline.EventOccurrence): |
| 964 | config = message.body |
| 965 | assert "request" in config |
| 966 | elif isinstance(message, timeline.RequestOccurrence): |
| 967 | config = dict(message.body("configuration", dict)) |
| 968 | assert "request" not in config |
| 969 | config["request"] = "attach" |
| 970 | return Session(config) |
| 971 | |
| 972 | def wait_for_disconnect(self): |
| 973 | self.timeline.wait_until_realized(timeline.Mark("disconnect"), freeze=True) |