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

Debug messages in config #128

Merged
merged 4 commits into from May 14, 2024
Merged

Conversation

mhuretski
Copy link
Contributor

Hi,

Currently there's no way to turn off debug messages on local machine. It's very convenient to have them during debugging, but when everything is set up, there's no point to have them in console both on server and client.

This is non-breaking change that adds ability to turn them off.

If it's not a good fit for your vision, could you add ability to turn them off the way you see it?

Copy link

codesandbox bot commented May 11, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@robisim74
Copy link
Owner

@mhuretski Thanks for this pr. You're right: an option to disable debugging is missing.

Unfortunately, there are two problems in your proposal:

  • this line will break dev mode, because it prevents you from running necessary code in dev mode, not just debugging
  • other debug points are missing in other parts of the library, like here

However, I don't like this "imperative" way of proceeding, that is, putting the condition for debugging at every point in the code: instead, a refactoring of the debug method would be necessary to accept a new parameter for enabling/disabling, and changing or adding a new method for this kind of debugging.

Let me know if you have time to complete this pr, otherwise I will do so when possible.

Thank you

@mhuretski
Copy link
Contributor Author

@robisim74, updated pr

@robisim74
Copy link
Owner

@mhuretski Perfect! Thanks again!

@robisim74 robisim74 merged commit eea17f3 into robisim74:main May 14, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants