Closed Bug 929824 Opened 9 years ago Closed 9 years ago

Debugger logging not pretty printed when remote end not logging


(DevTools :: Framework, defect)

Not set


(Not tracked)

Firefox 27


(Reporter: jryans, Assigned: jryans)



(1 file)

After the change in bug 923600, if you use a client with debugger logging enabled to connect a server with logging disabled, you no longer see pretty printed messages on the client.
This changes the previous patch from bug 923600 so we never pretty print over the wire, but if and only if the receiver is logging, then pretty print for them.
Attachment #820744 - Flags: review?(rcampbell)
Summary: Debugger client logging no longer pretty printed → Debugger logging not pretty printed when remote end not logging
This calls JSON.stringify (and wantLogging) twice though, right?

I guess it's a good tradeoff to make the local case with debug enabled slower, if this ends up making the remote case with debug disabled faster.
Comment on attachment 820744 [details] [diff] [review]
Pretty print RDP on receive

Review of attachment 820744 [details] [diff] [review]:


Nick just changed this in bug 923600.

I'm not a huge fan of stringifying more than once here, but don't have a good suggestion on how to ensure received packets that weren't pretty-printed get reformatted correctly.
Attachment #820744 - Flags: review?(rcampbell) → review+
The non-logging case is still as fast as possible: sender does a single stringify w/o indenting, and the receiver parses.

If you're logging, the receiver additionally stringifies with indenting.  So, I think it's a reasonable tradeoff, especially since the side that will actually be printing controls whether the indenting happens.
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 27
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.