Closed Bug 866278 Opened 11 years ago Closed 11 years ago

remote debugging protocol: number packets when dumping

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 23

People

(Reporter: jimb, Assigned: jimb)

Details

Attachments

(1 file, 1 obsolete file)

It makes packet logs a lot easier to read if you associate numbers with packets, and print when the packet is sent and received. For the simple tests, it's not interesting, but for the more involved tests, it's extremely helpful to be able to see when something was sent, and when it was actually received.
Attachment #742549 - Flags: review?(past)
Revised. Works better when the count is shared between the two paired LocalDebuggerTransport instances...
Assignee: nobody → jimb
Attachment #742549 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #742549 - Flags: review?(past)
Attachment #742579 - Flags: review?(past)
Comment on attachment 742579 [details] [diff] [review]
Remote debugging protocol: show sequence numbers with packets.

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

::: toolkit/devtools/debugger/dbg-transport.js
@@ +262,4 @@
>     * endpoint.
>     */
>    send: function LDT_send(aPacket) {
> +    let serial = this.serial.count++;

Wouldn't it make sense to move this inside the if(wantLogging) branch?
Attachment #742579 - Flags: review?(past) → review+
(In reply to Panos Astithas [:past] from comment #2)
> Comment on attachment 742579 [details] [diff] [review]
> Remote debugging protocol: show sequence numbers with packets.
> 
> Review of attachment 742579 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: toolkit/devtools/debugger/dbg-transport.js
> @@ +262,4 @@
> >     * endpoint.
> >     */
> >    send: function LDT_send(aPacket) {
> > +    let serial = this.serial.count++;
> 
> Wouldn't it make sense to move this inside the if(wantLogging) branch?

I thought about that. But if something turns wantLogging on or off in the midst of a session, we could have packets sent before the switch being delivered after the switch, and it seemed like it would be more comprehensible to have them all numbered.
https://hg.mozilla.org/integration/mozilla-inbound/rev/e245f0728bc9
Flags: in-testsuite-
OS: Linux → All
Hardware: x86_64 → All
Target Milestone: --- → Firefox 23
https://hg.mozilla.org/mozilla-central/rev/e245f0728bc9
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: