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

[Question] How to disable Debug mode, once I set PWDEBUG in env. variable now it's always running in debug mode #5649

Closed
yousufwaqar opened this issue Feb 28, 2021 · 7 comments

Comments

@yousufwaqar
Copy link

No description provided.

@pavelfeldman
Copy link
Member

What do you call a debug mode? pw:api only prints the logs, it isn't a debug mode, PWDEBUG=1 is.

@mxschmitt
Copy link
Member

Probably you used set on Windows, which sets the environment variable for the current shell, try to either reset it with:

set DEBUG=

or create a new terminal shell.

@yousufwaqar
Copy link
Author

yousufwaqar commented Feb 28, 2021

@pavelfeldman, even though by just using node Filename.js. it's opening the inspector tool every-time and has to explicitly press the play button to continue the execution. It's been only a few days that I am using Playwright, maybe I've missed something but I think the inspector feature introduced in 1.9.1 a few days ago only.

@yousufwaqar
Copy link
Author

Probably you used set on Windows, which sets the environment variable for the current shell, try to either reset it with:

set DEBUG=

or create a new terminal shell.

No, I only used set DEBUG=pw:api

@pavelfeldman
Copy link
Member

Could you check if your environment has PWDEBUG variable set?

@yousufwaqar
Copy link
Author

Could you check if your environment has PWDEBUG variable set?

@pavelfeldman , Yes env. had PWDEBUG variable set to 1. after deleting it. the scripts are running fine but to check I set the variable again it was again launching the browser along with inspector even after simply just running the script using node fiilename.js. Is this expected behavior that we have to explicitly add and delete PWDEBUG variable every-time we want to debug using inspector cuz it could be a little tedious.

@yousufwaqar yousufwaqar changed the title [Question] How to disable Debug mode, once I set DEBUG=pw:api now it's always running in debug mode [Question] How to disable Debug mode, once I set PWDEBUG in env. variable now it's always running in debug mode Mar 2, 2021
@pavelfeldman
Copy link
Member

You can use cross-env to simplify it on Windows:

npx cross-env PWDEBUG=1 node test.js

This will only enable this environment variable for the time of execution.

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

No branches or pull requests

4 participants