Open Bug 1512791 Opened 6 years ago Updated 2 years ago

Browser console does not log cached background script logs

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(firefox64 affected, firefox65 affected, firefox66 affected)

Tracking Status
firefox64 --- affected
firefox65 --- affected
firefox66 --- affected

People

(Reporter: billy78, Unassigned)

References

(Blocks 1 open bug)

Details

User Story

**Steps to reproduce**
1. Download Test.zip attachment
2 [review]. Go to about:debugging
3. Use the "Load temporary add on" to load it
4. Open a new tab and try to navigate to "https://www.mozilla.org/"
5. Open the browser console

**Expected results**

There should be a "Test : https://www.mozilla.org/ background.js:10:2" message

**Actual results**

There is no such message
---

Attachments

(1 file)

640 bytes, application/octet-stream
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0

Steps to reproduce:

I have a created a web extension using browser.webRequest.onBeforeRequest to cancel specific requests. If a request needs to be cancelled, I want to log the url using console.log in browser console.


Actual results:

The url appears in the browser console only if its window is open. If the browser console window is closed, the url is not logged in the browser console after I open it.


Expected results:

I would expect that the url would be logged, regardless of the state of the browser console window.
Hi Billy,

Can you please attach a minimal test case so I can reproduce this issue?

Thank you!
Flags: needinfo?(billy78)
Attached file Test.zip
Flags: needinfo?(billy78)
Comment on attachment 9030723 [details]
Test.zip

Zip file contains manifest.json and background.js of a test extension which simply cancels all requests and logs them.
I managed to reproduce the issue on Windows 10, Mac os and Ubuntu 16.04, On Nightly 66.0a1 (2018-12-12), Firefox 65.0b3 and Firefox 64.0.
Status: UNCONFIRMED → NEW
Component: Untriaged → Console
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → DevTools
Hardware: Unspecified → All
Version: 63 Branch → Trunk
User Story: (updated)
Priority: -- → P3
Summary: console.log in background script of web extension doesn't work if browser console is closed → Browser console does not log cached background script logs

billy78, note that you can use the about:debugging page to inspect your extension. Clicking on the Inspect button will give you a dedicated toolbox, and you can see messages in the Console tab.

Hope this is useful.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: