Skip to content
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

Issues using DEBUG var env #5051

Closed
FranciscoMSM opened this issue Aug 28, 2019 · 7 comments · Fixed by #28380
Closed

Issues using DEBUG var env #5051

FranciscoMSM opened this issue Aug 28, 2019 · 7 comments · Fixed by #28380
Labels

Comments

@FranciscoMSM
Copy link

Current behavior:

When I run DEBUG=cypress:* cypress run I got ALL the messages from cypress.
So far so good.
When I try to be more specific ie DEBUG=cypress:server* cypress run - I don't get to see any log at all.

Desired behavior:

According to the docs I should be able to use more specific selectors like the docs ones but they don't seem to work.
screen

Steps to reproduce: (app code and test code)

DEBUG=cypress:server:* cypress run produces no extra logging

Versions

Cypress 3.4.0, Debian 9, Electron 61 Headless

@jennifer-shehane
Copy link
Member

I'm not able to reproduce this issue using Cypress 3.8.1 or 3.4.0, OSX

Screen Shot 2020-01-07 at 2 45 13 PM

Please comment providing more information that may be relevant to why this is happening so that we can investigate.

We use debug package for this printing, so maybe it is something involving that. /~https://github.com/visionmedia/debug

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Jan 15, 2020

Reopening with another person mentioning the DEBUG logs not printing for them. #6160

To reproduce this issue, you can simply start a new cypress project:

npm i --save cypress
./node_modules/.bin/cypress open

If you run
DEBUG=cypress* node_modules/.bin/cypress run
all debugs are printed in the console

if you run
DEBUG=cypress:server:browsers:electron node_modules/.bin/cypress run
No debug message is printed

Operating System: Linux Mint

I was not able to reproduce this behavior however on Mac Catalina.

Screen Shot 2020-01-15 at 2 13 57 PM

@jennifer-shehane jennifer-shehane added stage: needs information Not enough info to reproduce the issue cli labels Jan 15, 2020
@jennifer-shehane jennifer-shehane removed the stage: needs information Not enough info to reproduce the issue label Mar 11, 2020
@jennifer-shehane
Copy link
Member

Closing since still unable to reproduce. Please comment if you're encountering this issue with a description of your system, how you're setting the env vars (maybe even print all env vars) and the output during cypress run and we will consider reopening.

@jennifer-shehane
Copy link
Member

Someone we worked with that had this issue, we narrowed it down to a permissions issue with setting the environment variable in their terminal/shell. You may need to run your terminal in administrative mode or review your permission settings.

@szy54
Copy link

szy54 commented Oct 4, 2021

@jennifer-shehane I am currently facing it and with DEBUG=cypress:server* cypress run it works locally on OSX, however it doesn't work on the ubuntu20.04 EC2 that I usually run the cypress from (as part of CI in jenkins).
I doubt the problem is with permissions to set the env var.
I'll leave couple examples from myself, but I'm not able to dig into cypress or debug package code myself to analyze it during $work.
My aim was to enable cypress:server:video logs and you'll laugh at how I achieved it 🤣
DEBUG=cypress:* works
DEBUG=cypress:cli* works
DEBUG=cypress:server* doesn't work
DEBUG=cypress:*,cypress:server:video prints everything
DEBUG=cypress:cli*,cypress:server:video prints only cli*
also I realised that excluding is working
DEBUG=cypress:*,-cypress:cli* works as expected
so I ended up with enabling cypress:* and excluding everything else that I don't need. 🤯
DEBUG=cypress:*,-cypress:launcher*,-cypress:ts*,-cypress:https*,-cypress:proxy*,-cypress:server:u*,-cypress:server:validation*,-cypress:server:r*,-cypress:server:s*,-cypress:server:t*,-cypress:server:p*,-cypress:server:o*,-cypress:server:a*,-cypress:server:b*,-cypress:server:c*,-cypress:server:d*,-cypress:server:e*,-cypress:server:f*,-cypress:server:g*,-cypress:server:h*,-cypress:server:i*,-cypress:server:w*,-cypress:n*,-cypress:c*

@gedkirkham
Copy link

I resolved this issue by running the below command.

export DEBUG=cypress* rather than DEBUG=cypress*

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 5, 2023

Released in 13.6.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.6.1, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants