Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly check that Debugger domain is disabled before starting Tracing #49007

Closed
wants to merge 1 commit into from

Conversation

hoxyq
Copy link
Contributor

@hoxyq hoxyq commented Jan 28, 2025

Summary:

Changelog: [Internal]

Before sending Tracing.start, CDT will also send Debugger.disable.

You don't want to hit your breakpoints when you are profiling an appplication, this is by design.

We won't just delegate this to Hermes to handle. We will explicitly check that this condition is satisfied on React Native side. This is done to avoid regression in case the implementation details will change on CDT side.

Later in D68414421, we will also check that samples JavaScript stack don't contain debugger frames. This is necessary to distinguish garbage collector frames from debugger frames, which share the same type in Hermes VM - "Suspend".

We need garbage collector frames. If debugger frame was found we would throw an error, because this is unexpected after Debugger domain was disabled.

Right now Hermes is not disabling local VM Debugger on Debugger.disable method - this is a known bug, which I am addressing in a stack from D68772900.

Differential Revision: D68776863

…cing

Summary:
# Changelog: [Internal]

Before sending `Tracing.start`, CDT will also send `Debugger.disable`.

You don't want to hit your breakpoints when you are profiling an appplication, this is by design.

We won't just delegate this to Hermes to handle. We will explicitly check that this condition is satisfied on React Native side. This is done to avoid regression in case the implementation details will change on CDT side.

Later in D68414421, we will also check that samples JavaScript stack don't contain debugger frames. This is necessary to distinguish garbage collector frames from debugger frames, which share the same type in Hermes VM - "Suspend".

We need garbage collector frames. If debugger frame was found we would throw an error, because this is unexpected after Debugger domain was disabled.

Right now Hermes is not disabling local VM Debugger on `Debugger.disable` method - this is a known bug, which I am addressing in a stack from D68772900.

Differential Revision: D68776863
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 28, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68776863

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @hoxyq in dd240ed

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants