LibDevTools: Support launching Firefox devtools directly from Ladybird#10707
Open
trflynn89 wants to merge 7 commits into
Open
LibDevTools: Support launching Firefox devtools directly from Ladybird#10707trflynn89 wants to merge 7 commits into
trflynn89 wants to merge 7 commits into
Conversation
trflynn89
force-pushed
the
devtools_client2
branch
2 times, most recently
from
July 15, 2026 20:06
acd45ce to
c11ec6e
Compare
TabActors are currently only registered when the client requests the
tab list, which about:debugging always does before opening a toolbox.
A toolbox connecting directly to a known tab (about:devtools-toolbox
with host, port, and tab id query parameters) issues getTab as its
first request, on a fresh connection where no TabActor exists yet.
The response then had no tab entry, and the client failed with:
TypeError: can't access property "actor", v is undefined
Look up the tab in the delegate's tab list and register its actor on
demand, as the listTabs handler does.
LibDevTools only supports one active client. It previously checked for one before accepting a waiting client, leaving that client in the listen backlog. The accept notifier would then fire in a busy loop and starve the active connection's event processing. Accept every client first and immediately close it if another connection is active. This drains the listen backlog while preserving the single-client contract.
Locate Firefox installations on each supported desktop platforms. Generate a Ladybird-owned profile that pre-seeds the DevTools network location, then launch Firefox into about:devtools-toolbox without modifying its installation.
Own one stock Firefox client process at the application level. Launch it with the active DevTools server port and terminate it when the server is disabled.
Launch the application-owned Firefox client from the DevTools banner and report discovery or startup errors through the existing error dialog.
Extend the shared info bar with an action button that launches the application-owned Firefox client. Report discovery or startup errors through the existing error dialog.
trflynn89
force-pushed
the
devtools_client2
branch
from
July 15, 2026 20:06
c11ec6e to
a899edf
Compare
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.
We previously would have to start the devtools server in Ladybird and manually open
about:debuggingin Firefox to connect to the server, then pick which tab to inspect. We can now detect an already-installed Firefox instance and launch the devtools client directly through that. To do so, we create a Ladybird-owned Firefox profile with specific prefs and CSS to enable immediate communication with Ladybird.devtools.webm