Closed Bug 997372 Opened 10 years ago Closed 4 years ago

Add actor type logging to protocol.js

Categories

(DevTools :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: dcamp, Assigned: dcamp)

Details

Attachments

(1 file)

This patch adds "devtools.log-actors" and "devtools.log-fronts" preferences, each of which can be set to a comma-separated list of typeNames from protocol.js.  When set, conversations to that actor type will be logged independently.

For example: devtools.log-actors=domwalker,domnode will log the server side of the communication with domwalker and domnode actors.
Attachment #8407767 - Flags: review?(nfitzgerald)
Comment on attachment 8407767 [details] [diff] [review]
actor-logging.diff

Review of attachment 8407767 [details] [diff] [review]:
-----------------------------------------------------------------

Can you update the info here, please: https://wiki.mozilla.org/DevTools/Hacking#Enabling_DevTools_Logging

::: toolkit/devtools/server/protocol.js
@@ +18,5 @@
> +let gFrontLogTypes;
> +
> +function updateLogging()
> +{
> +  let typeNames = require("sdk/preferences/service").get("devtools.log-actors", "").split(",");

Nite: Line length.

Below as well.

@@ +849,5 @@
>    writeError: function(err) {
>      console.error(err);
>      if (err.stack) {
>        dump(err.stack);
>      }

Not related to this patch, but we should use |DevToolsUtils.reportException| here. File a bug or ride along with this patch?
Attachment #8407767 - Flags: review?(nfitzgerald) → review+
https://hg.mozilla.org/integration/fx-team/rev/f92e1b127fe8
Assignee: nobody → dcamp
Whiteboard: [fixed-in-fx-team]
Product: Firefox → DevTools

Obsolete bug, closing.

Honza

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.