Skip to content

Conversation

lachieh
Copy link

@lachieh lachieh commented Aug 19, 2025

I noticed that the console methods all print the source as __x00__virtual:console-forward:115 in the browser console. By binding the method to console object as the this context, the correct source information is preserved.

Nevermind, it's still not behaving the way it should. Reverting to draft for now...

Also added a sneaky update to the README.md that fixes #2.

@lachieh lachieh marked this pull request as draft August 19, 2025 16:34
@lachieh
Copy link
Author

lachieh commented Aug 19, 2025

Turns out the only way to prevent this is to either add a sourcemap and ignore it using the x_google_ignoreList property, or to manually ignore this script using the browser.

I'm going to close this for now, but I do have a solution that generates the correct sourcemap and ignores it from the browser debugger.

Hat tip to this blogpost: https://anthonykuske.com/how-to-extend-console-log-and-keep-the-correct-filename-and-line-numbers-shown-in-the-console/

@lachieh lachieh closed this Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix how to import the plugin in the README

1 participant