(self, method)
| 740 | return "".join(event("output", str) for event in events) |
| 741 | |
| 742 | def _request_start(self, method): |
| 743 | self.config.normalize() |
| 744 | start_request = self.send_request(method, self.config) |
| 745 | |
| 746 | # Depending on whether it's "noDebug" or not, we either get the "initialized" |
| 747 | # event, or an immediate response to our request. |
| 748 | self.timeline.wait_until_realized( |
| 749 | timeline.Event("initialized") | timeline.Response(start_request), |
| 750 | freeze=True, |
| 751 | ) |
| 752 | |
| 753 | if start_request.response is not None: |
| 754 | # It was an immediate response - either the request failed, or there is |
| 755 | # no configuration stage for this debug session. |
| 756 | start_request.response.result # raise exception if failed |
| 757 | return self.wait_for_process() |
| 758 | |
| 759 | # We got "initialized" - now we need to yield to the caller, so that it can |
| 760 | # configure the session before it starts running. |
| 761 | return self._ConfigurationContextManager(self) |
| 762 | |
| 763 | class _ConfigurationContextManager(object): |
| 764 | """Handles the start configuration sequence from "initialized" event until |
no test coverage detected