-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Processing Chrome's extension console log from the outside? #2294
Comments
Chrome does support a way to globally enable logging of internals (https://www.chromium.org/for-testers/enable-logging). It can be used to direct the output of the JS console to stderr or a file, but it doesn't offer the ability to do this for a specific tab in a reasonable way (technically it may be possible to do so with If we are willing to dump the console of Chrome (regardless of source) to the output when
|
The
Chrome does unconditionally write to We cannot implement the feature requested here unless Chrome and/or chrome-launcher offers support for capturing specific logs and stderr/stdout. |
Thanks for the research! |
I can't say I can figure how to get chromium/chrome to provide the console log of a particular service worker either. Might chase that later and come back here. |
Is this a Chrome-specific issue? I don't see any stdout when running Firefox either. I'm running tape in the content script and background page but currently I have to manually open each context to inspect the logs. I'd love to see the console in the terminal. However I'm not too sure how I'd ask |
When There are various ways to close web-ext. For example by using it as a library. Or by starting a local server, and send a request to that server from the test. Upon receiving the message, send a SIGINT signal to the web-ext process. |
What's "output from Firefox"? It's not the console I screenshotted, as far as I can see, so this is not a Chrome-specific issue. |
I see messages from the global browser console in the output. If you really like to output something without being drowned in logspam in stdout, then you can use |
Hi,
I find that processing the extension's logs would be of great value for CI and (headless) tests, aside being a great time saver for quickly figuring very immediately whenever your extension crashes while loading, during regular extension development.
I have tried
--browser-console
but it has no effect in my case where the target binary is the current Chrome Beta channel Chrome version 93 release. I would also like to eventually process the extension's console log via the command line, if such an option is available, for testing/CI and for early warnings upon source change reloads.Chromium has a myriad of command-line startup options relating to debugging and logging levels of course, and it has a remote logging API ― they can obviously be added to the target binary via the
--args
option of web-ext, but I wonder if you have any kind or built-in feature (or recipe) for particularly getting the extension's console log for processing outside the browser UI; The background service worker's console being or particular interest in my view and case.My setup:
Ubuntu 20.04, latest npm install of web-ext.
My sincere thank you for your thoughts and assistance,
Matan
The text was updated successfully, but these errors were encountered: