question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Serialize console.log/info/warn/error to stdout on CLI runs

See original GitHub issue

Currently 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:open
  • Created 6 years ago
  • Reactions:56
  • Comments:26 (8 by maintainers)

github_iconTop GitHub Comments

13reactions
folmertcommented, Mar 22, 2019

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.

11reactions
MaaikeFoxcommented, Dec 17, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found