Closed Bug 1532319 Opened 5 years ago Closed 5 years ago

Log Points should have context

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(firefox68 fixed)

RESOLVED FIXED
Firefox 68
Tracking Status
firefox68 --- fixed

People

(Reporter: jlast, Assigned: jlast)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(4 files)

It would be great if log points showed additional the context of where they were called. For instance, the function it was called in and its relationship with the prior log messages.

Priority: -- → P3

Here is a prototype, which includes display names.

  • nesting the display names (i.e. triggerEvents is indented) will be more interesting, but this is still valuable.
  • the display name probably needs some more design polish as well to help it stand out.

https://github.com/jasonLaster/gecko-dev/commit/143315a128e20064c2eb33b298535bd1f0c719d3

I like the idea of method information in general. I'd imagine them grouped with the location/stack information on the right, as they provide similar insights.

I am not sure why Logpoints need them more than other console.logs. Logpoints are added by devs and then logged in the same session, so they are usually the most recent on their mind. Maybe we can get more crisp on what problem this is solving.

(In reply to :Harald Kirschner :digitarald from comment #3)

I like the idea of method information in general. I'd imagine them grouped with the location/stack information on the right, as they provide similar insights.

I am not sure why Logpoints need them more than other console.logs. Logpoints are added by devs and then logged in the same session, so they are usually the most recent on their mind. Maybe we can get more crisp on what problem this is solving.

I like this too. Is there any perf penalty we need to pay for displaying this additional info to the user?

Honza

Related, it would be nice to see how often people log a single string, i.e. "hello" as a way of seeing that a line is run.

https://twitter.com/sebmck/status/1109644524995801088

One goal I have would be to make this simple case (a logPoint with an empty expression) a single click.

Related, it would be nice to see how often people log a single string, i.e. "hello" as a way of seeing that a line is run.

Another solution would be also giving logpoints good default values, like function name and line.

(In reply to :Harald Kirschner :digitarald from comment #6)

Another solution would be also giving logpoints good default values, like function name and line.
I like that and plus perhaps function arguments.

Honza

Just attached two screenshots, with context on nesting. The first has arrows, the second doesn't.

Nesting highlights function execution. e.g. triggerEvents is called by trigger. This should make it easier for users to read the logs.

As follow up items:

  • It would be nice if all of the console messages followed the same nesting rules
  • It would be nice for messages to actual be grouped by execution, so this means separating messages from different executions / threads, linking messages in an async frame...
Attached image nesting - logs (2).jpg
Attached image nesting logs.jpg
Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6bccd21b829d
Log Points should have context. r=davidwalsh
Depends on: 1543291
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
Assignee: nobody → jlaster
Depends on: 1544559

Hi, what are the STR to see editor.conditionalPanel.placeholder2 and editor.conditionalPanel.logPoint.placeholder2 in action?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: