[RFC] piping all console to a centralized place in development
How do you envision this feature/change to look/work like?
Whenever you click inspect on the Popup window, it should be available all the time. There's no need to open it once again after making small changes in the code and saving it. Also If there could be a "server tab" opened like in React Native, where all the logs would be visible, this is fine too.
What is the purpose of this change/feature? Why?
Every time I make a small change in the code, the Popup page refreshes and the console window closes. It's hard to debug anything this way.
(OPTIONAL) Example implementations
No response
(OPTIONAL) Contact Details
Verify canary release
- [X] I verified that the issue exists in
plasmocanary release
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] I checked the current issues for duplicate problems.
I think piping the log back to either the watcher console or into a page like expo would be nice.
I wonder if the reloading is caused due to our popup.js generates a new hash (?) or due to the chrome runtime reload we're using to do hot reload (?)...
Piping console is likely most long-term solution tho
The piping is possible by introducing a middle-man runtime at the parcel runtime level, replacing all console log within the bundle code with a call to the internal websocket server. That should definitely work - once the console piping is done, then it should be trivial to deal with the log data either on a dashboard or just throw it on the main terminal runner for now, maybe behind a flag.
As long as I can read the logs they can be shown anywhere. The best would be to have it in the console, but the terminal is fine too.
@louisgv And I think the answer to your question is yes. I think that reloading is caused to generating a new hash every time.
As long as I can read the logs they can be shown anywhere. The best would be to have it in the console, but the terminal is fine too.
@louisgv And I think the answer to your question is yes. I think that reloading is caused to generating a new hash every time.
Yeah the main problem with using the console is that it is controlled by chrome process. I think this is the key reason why Expo piped all their log and show it with their own console UI, unlike Cordova/Phonegap where they relied on the chrome remote console, which would lose information the moment they disconnect xD
Since the fix in #255 , this issue prioritization could be lower now imo - we now have actual HMR for react, thus the popup inspector will not close.