-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Feature] Make closeable #24
Comments
Hello 👋 May I ask what scenarios require dynamic activation and deactivation of network debugging in the production environment? I strongly do not recommend using Meanwhile, if you expect dynamic activation, I would recommend using the following code to ensure that it only takes effect in the development environment. import { register } from 'node-network-devtools'
process.env.NODE_ENV === 'development' && register() |
I agree with your point that However, emmm... sometimes reality doesn't match expectations. We are developing a Node.js client-side software (not server-side), and when troubleshooting issues on-site, we hope to observe network requests in a more intuitive way instead of through logs :) I've made some simple modifications to the code, and it now achieves something similar to an 'unregister' function. From a broad perspective, this might not necessarily be a common requirement, but for a tool, if it can be opened, shouldn't it also be possible to close it? Because turning it on will cause performance loss, it can be turned off when not needed (although I can also choose to restart our node program...) If you think this idea is feasible, I can submit a merge request (MR). |
I think this is great! Allow us to proactively eliminate side effects~ |
I've committed the MR, and you can review it. Since I'm not very familiar with it, there might be some missed resource releases or rollbacks. |
Right! |
I will confirm and publish after I come back from exercise in the evening |
Desc
In some cases, it may be necessary to dynamically enable and disable network debugging in a production environment, but there is currently no way to disable it. Will keeping it enabled continuously affect performance or memory consumption? Can a method to disable this feature be added?
To Resolve?
A reasonable cost for implementation makes adding a shutdown feature worthwhile in my opinion.
Resolutions(Optional)
...
The text was updated successfully, but these errors were encountered: