Enable worker console message by default

NEW
Unassigned

Status

3 years ago
4 months ago

People

(Reporter: jryans, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
After bug 1125205, the console now shows messages from workers.  However, it defaults to disabled in the console filters.

Wouldn't the feature be more obvious if it defaulted to on?
(Reporter)

Comment 1

3 years ago
:past, :baku, any thoughts one way or the other?
Flags: needinfo?(past)
Flags: needinfo?(amarchesini)
The web console displays normal worker messages from the tab it inspects by default. It doesn't display messages from shared and service workers, because they may be instantiated by a different tab. The idea is that when you have dozens of tabs open, the one (or few) tabs that will be using such a worker are unlikely to be the one you are debugging right now. If it is and you don't see messages that you expect to be there, then you are likely to start checking your filters. In the more common case, a developer would be surprised to see messages in the web console that come from other tabs ("ooh, security breach!").

The browser console of course has these filters on by default.
Flags: needinfo?(past)
Flags: needinfo?(amarchesini)
Comment hidden (spam)
(Reporter)

Comment 4

3 years ago
(In reply to Panos Astithas [:past] from comment #2)
> The web console displays normal worker messages from the tab it inspects by
> default. It doesn't display messages from shared and service workers,
> because they may be instantiated by a different tab. The idea is that when
> you have dozens of tabs open, the one (or few) tabs that will be using such
> a worker are unlikely to be the one you are debugging right now. If it is
> and you don't see messages that you expect to be there, then you are likely
> to start checking your filters. In the more common case, a developer would
> be surprised to see messages in the web console that come from other tabs
> ("ooh, security breach!").
> 
> The browser console of course has these filters on by default.

Hmm.  I would rather just show things until someone actively says "I was surprised!", especially with the console API.  I would think developers expect that to just work.  It's actually a bit more confusing in this case, because the overall "Logging" filter group shows as active, but the worker specific ones are not.

I can understand leaving add-on and chrome workers to browser console, that makes sense.  But shared and service workers should have some relation to site you are developing which caused you to open the console in the first place, right?  If those workers have console.* calls (which they probably only have for development), then I'd like to see them by default.

Just my perspective though. :)
Flags: needinfo?(ccssautomation)

Updated

4 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.