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

Attach debugger only when panel is opened. #106

Merged
merged 2 commits into from
Sep 28, 2021

Conversation

max-vogler
Copy link
Contributor

@max-vogler max-vogler commented Sep 16, 2021

Previously, audion would attach the debugger as soon as any devtools panel is opened - this would show the browser's warning bar even before the user opened the DevTools panel. This PR delays attaching the debugger until the user actually opens the audion panel for the first time.

Fixes #105

chrome.debugger.onDetach.addListener(onDetach);
chrome.debugger.onEvent.addListener(onEvent);
chrome.devtools.network.onNavigated.addListener(onNavigated);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mzgoddard: Is there a specific reason for re-enabling the debugging through sendCommand when onNavigated is triggered? Even after removing the code, Web Audio DevTools works when navigating between different pages.

@max-vogler max-vogler changed the title WIP: Connect debugger only when panel is shown. Attach debugger only when panel is opened. Sep 23, 2021
Copy link
Member

@hoch hoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for working on this, Max!

@max-vogler max-vogler merged commit da9dc50 into GoogleChrome:main Sep 28, 2021
@max-vogler max-vogler deleted the late-debugger branch November 11, 2021 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"'audion' started debugging this browser" appears before "Web Audio" tab is opened
2 participants