Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

375
Views
How to read console messages `console.log` etc from a content script

I want to wrap console functions like below.

const realLog = console.log;
console.log = function (){
  myFunction(arguments);
  realLog(arguments);
}

The problem is content scripts run in an isolated environment, so I can't redefine console.log. Since there is no event for console.log, though can use error for errors, I can't reach page's console.log messages.

To prevent prospective XY problem I want to read console messages, from a web extension, without removing them from console. I can use content, background, action script etc. It doesn't matter, since I can use messaging to pass between them.

It's possible because there is an extension built on this.

I looked at other posts, they didn't help.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!