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

Add an option to DevTools to enable double-logging #19666

Closed
gaearon opened this issue Aug 20, 2020 · 10 comments
Closed

Add an option to DevTools to enable double-logging #19666

gaearon opened this issue Aug 20, 2020 · 10 comments

Comments

@gaearon
Copy link
Collaborator

gaearon commented Aug 20, 2020

We currently plan to suppress double-logging in development by overriding console in 17: #18547

However this can be confusing for some scenarios and double logging may be preferable in them.

Ideally we'd add a toggle to DevTools that would allow to re-enable it on this screen:

Ef3bFlWWoAARjz9

@gaearon gaearon added Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug good first issue Type: Enhancement and removed Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Aug 20, 2020
@Jchinonso
Copy link

I could take this up!

@gaearon
Copy link
Collaborator Author

gaearon commented Aug 20, 2020

Sounds good.

@Jchinonso
Copy link

Jchinonso commented Aug 29, 2020

@gaearon i need more light on how to go about this. I have created the UI already #19710 but pretty confused on how to get the boolean value in packages/shared/ConsolePatchingDev.js. Or am i to do the manipulation here https://github.com/facebook/react/blob/master/packages/react-devtools-shared/src/backend/console.js

@todortotev
Copy link
Contributor

todortotev commented Sep 14, 2020

@Jchinonso Are you working on the PR? If you are busy do you mind if I take it up?

@Jchinonso
Copy link

@todortotev PR is up already #19710

@todortotev
Copy link
Contributor

@todortotev PR is up already #19710

Apologies! My bad! Good work!

@Jchinonso
Copy link

Jchinonso commented Sep 14, 2020

@todortotev PR is up already #19710

Apologies! My bad! Good work!

No worries

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Jan 9, 2022
@bisubus
Copy link

bisubus commented Feb 24, 2022

@Stale It' still relevant

@stale stale bot removed the Resolution: Stale Automatically closed due to inactivity label Feb 24, 2022
@eps1lon
Copy link
Collaborator

eps1lon commented Feb 24, 2022

Fixed by #22030
TL;DR:

  • Disable console suppression by default in React.
  • DevTools should grays out (but not hide) logs during second render pass by default.
  • DevTools has a new Debugging preference that allows users to suppress second logs entirely (mimicking the current default behavior).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants