Skip to content

MarkusLund/chrome-console-copy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Console Copy

A Chrome extension that lets you copy console output without stack traces. Only the messages you see — console.log, console.warn, console.error, console.info, and console.debug — cleanly formatted and ready to paste.

Console Copy screenshot

Install

  1. Clone or download this repository
  2. Open chrome://extensions/ in Chrome
  3. Enable Developer mode (toggle in the top right)
  4. Click Load unpacked
  5. Select the chrome-console-copy folder
  6. Pin the extension from the puzzle-piece icon in the toolbar for quick access

Usage

  1. Navigate to any webpage
  2. Interact with the page (console messages are captured automatically in the background)
  3. Click the Console Copy extension icon to open the popup
  4. Use the controls to view and copy logs:
Control Description
Copy All Copy every captured log to the clipboard
Copy Filtered Copy only the logs currently visible after applying filters
Clear Clear all captured logs for the current tab
Level checkboxes Toggle which log levels are shown (log, info, warn, error, debug)
Include field Only show logs matching any of the comma-separated terms
Exclude field Hide logs matching any of the comma-separated terms
.* toggle Switch between plain text and regex mode for the include/exclude fields

Filtering examples

  • Include api, fetch — only shows logs containing "api" or "fetch"
  • Exclude heartbeat, ping — hides logs containing "heartbeat" or "ping"
  • Regex mode (.* active): Include \d{3} — only shows logs containing a 3-digit number
  • Combine include, exclude, and level filters to narrow down exactly what you need

Notes

  • Logs are captured per tab and cleared automatically on page navigation
  • Up to 5,000 log entries are stored per tab
  • The original console output in DevTools is unaffected — the extension only intercepts to capture a copy
  • console.log("Hello %s", name) style formatting is supported
  • Error objects show name: message only, with no stack trace

How it works

The extension injects a content script (content.js) into every page at document_start in the MAIN world. This script wraps the native console.* methods to capture formatted output. Messages are relayed through a bridge script to a background service worker that stores them per tab. The popup reads from this store and provides filtering and clipboard copy.

License

MIT

About

Chrome extension to copy console output without stack traces

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors