Console Panel Remoting
From FirebugWiki
Contents |
[edit] Description
- Console Panel This object represents the Console Panel in Firebug. It's responsible for rendering all incoming logs and utilizing Firebug's repository of Domplate templates for building the output.
- Errors Analyzing and filtering incoming error messages.
- Console Processing all messages generated by Console API executed on the page.
- Console Service Listener Listening for all errors that happens on the page (client or content process).
- Console API Responsible for handling all Console API calls within the page.
[edit] Resources
[edit] Implementation
[edit] Remote Protocol
The Console panel uses and extends the Remote Debugging Protocol designed for Firefox.
Here is an example of typical communication between the server (content process) and client (chrome process) (described from the client perspective).
// Introduction packet, received just after connecting to the server RECEIVED {"from":"root","applicationType":"browser","traits":[]} // Request list of opened tabs on the server SENT: {"to":"root","type":"listTabs"} // The client has a list of tabs RECEIVED: {"from":"root","selected":0,"tabs": [{"actor":"conn2.tab2","title":"Google","url":"http://www.google.com/"}]} // Attach to a tab SENT: {"to":"conn2.tab2","type":"attach"} // Confirmation, client is now attached to the tab RECEIVED: {"type":"tabAttached","threadActor":"conn2.context3","from":"conn2.tab2"} // Request for Console actor SENT: {"to":"conn2.tab2","type":"consoleActor"} // Console actor (ID) retrieved RECEIVED: {"actor":"conn2.console4","serial":1,"from":"conn2.tab2"} // Subscribe to the console in order to receive the Console API and error events. SENT: {"to":"conn2.console4","type":"subscribe"} // Confirmation, the client is now subscribed to console events RECEIVED: {"subscribe":1,"from":"conn2.console4"}
