Add HostCommands for resuming and stepping debugger#44080
Closed
motiz88 wants to merge 3 commits into
Closed
Conversation
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D56098083 |
Base commit: 99d0c54 |
…sage (facebook#44078) Summary: Changelog: [Internal] Adds stub support for the [`Overlay.setPausedInDebuggerMessage`](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Overlay#method-setPausedInDebuggerMessage) CDP method to `HostAgent` in the Fusebox backend, and propagates it into the Android and iOS integrations through `HostTargetDelegate`. We take care to call `HostTargetDelegate::onSetPausedInDebuggerMessage()` a final time with a null `message` parameter, regardless of whether the client has actually sent the corresponding CDP message. Since multiple clients might be connected concurrently, we only send the `null` message when the *last* client which has requested a non-null message has disconnected. Differential Revision: D56068444
…ebook#44079) Summary: Changelog: [Internal] Implements an unstyled, non-interactive version of the "paused in debugger" in-app overlay in Fusebox on Android, based on the event introduced in D56068444. The implementation in `DevSupportManagerBase` is shared across Bridge and Bridgeless. In upcoming diffs in this stack, we'll add interactive features (namely "resume" and "step over" buttons, like in Chrome) and improve the visual styling of this overlay. Differential Revision: D56068445
Summary: ## Design Adds a new public `HostTarget::sendCommand` method, enabling integrators to send simple imperative commands to the target. As an implementation detail, the commands are translated internally to CDP and sent over a dedicated `HostTargetSession` (encapsulated in `HostCommandSender`). Any response from the underlying Agent is ignored. From the caller's perspective, these commands don't occur in the context of a session at all, and from the frontend's perspective, only the *effects* of the commands (if any) are seen. ## Use case HostCommands are specifically useful when we want to resume/step execution in response to a UI action. The commands map directly to the `Debugger.resume` and `Debugger.stepOver` CDP methods. NOTE: This is inspired by Chrome/V8's existing support for multiple concurrent CDP sessions. Any CDP client can successfully send `Debugger.resume` and `Debugger.stepOver` (without even subscribing to debugger events using `Debugger.enable`) and affect the state of other ongoing debugging sessions. Changelog: [Internal] Differential Revision: D56098083
b59db1d to
97e0c24
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D56098083 |
Contributor
|
This pull request has been merged in 58ddd74. |
|
This pull request was successfully merged by @motiz88 in 58ddd74. When will my fix make it into a release? | How to file a pick request? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Design
Adds a new public
HostTarget::sendCommandmethod, enabling integrators to send simple imperative commands to the target.As an implementation detail, the commands are translated internally to CDP and sent over a dedicated
HostTargetSession(encapsulated inHostCommandSender). Any response from the underlying Agent is ignored.From the caller's perspective, these commands don't occur in the context of a session at all, and from the frontend's perspective, only the effects of the commands (if any) are seen.
Use case
HostCommands are specifically useful when we want to resume/step execution in response to a UI action. The commands map directly to the
Debugger.resumeandDebugger.stepOverCDP methods.NOTE: This is inspired by Chrome/V8's existing support for multiple concurrent CDP sessions. Any CDP client can successfully send
Debugger.resumeandDebugger.stepOver(without even subscribing to debugger events usingDebugger.enable) and affect the state of other ongoing debugging sessions.Changelog: [Internal]
Differential Revision: D56098083