Serialize console.log/info/warn/error to stdout on CLI runs
See original GitHub issueCurrently there’s no way to see browser messages in stdout.
We can likely serialize the console.* method calls and send them to the node process.
Users would need a way to opt into this. Perhaps just another namespace DEBUG command like.
DEBUG=cypress:console:* cypress run
DEBUG=cypress:console:log cypress run
DEBUG=cypress:console:info cypress run
DEBUG=cypress:console:warn cypress run
DEBUG=cypress:console:error cypress run
Issue Analytics
- State:
 - Created 6 years ago
 - Reactions:56
 - Comments:26 (8 by maintainers)
 
Top Results From Across the Web
No console.log to STDOUT when running "npm test" (jest)
But in my case I have NPM configured to run Jest when issuing npm test from the shell, and any console.log() inside the...
Read more >bunyan - npm
extensible streams system for controlling where log records go (to a stream, to a file, log file rotation, etc.) bunyan CLI for pretty-printing...
Read more >Advanced command execution in Go with os/exec
We're executing the program via Go standard library function and by default stdout and stderr are discarded. Running a command and showing output....
Read more >Cannot print the terminal output in Streamlit?
import searchconsole account = searchconsole.authenticate(client_config="GSCTatieLouCredentials.json", serialize='credentials.json', ...
Read more >Command line interface - run - pydoit
pydoit guide - CLI usage and options. ... doit provides different “reporters” to display running tasks info on the console. Use the option...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Any update on this feature? Without it it’s really difficult to tell why my tests which pass locally are failing in headless browser on gitlab. Being able to see browser’s console errors/warnings in the terminal output would give me a great hint what’s wrong in my CI environment.
@jennifer-shehane I tried https://github.com/bahmutov/cypress-failed-log but it’s not relevant to this issue, it only prints cypress commands into terminal output, there is nothing about displaying browser’s errors.
I would also love to finally see this implemented in Cypress. It is very important for debugging failed tests, and that seems to me one of the first things a test tool should enable.