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

[RFC] Centralized log in development #193

Open
3 tasks done
Karniej opened this issue Sep 9, 2022 · 5 comments
Open
3 tasks done

[RFC] Centralized log in development #193

Karniej opened this issue Sep 9, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@Karniej
Copy link

Karniej commented Sep 9, 2022

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

karniej.p@gmail.com

Verify canary release

  • I verified that the issue exists in plasmo canary release

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@Karniej Karniej added the enhancement New feature or request label Sep 9, 2022
@louisgv
Copy link
Contributor

louisgv commented Sep 10, 2022

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

@louisgv louisgv changed the title [RFC] DevTools Console Always On Top [RFC] piping all console to a centralized place Sep 10, 2022
@louisgv louisgv changed the title [RFC] piping all console to a centralized place [RFC] piping all console to a centralized place on development Sep 10, 2022
@louisgv louisgv changed the title [RFC] piping all console to a centralized place on development [RFC] piping all console to a centralized place in development Sep 10, 2022
@louisgv
Copy link
Contributor

louisgv commented Sep 10, 2022

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.

@Karniej
Copy link
Author

Karniej commented Sep 14, 2022

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.

@louisgv
Copy link
Contributor

louisgv commented Sep 14, 2022

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

@louisgv louisgv changed the title [RFC] piping all console to a centralized place in development [RFC] centralized log in development Oct 4, 2022
@louisgv louisgv self-assigned this Oct 4, 2022
@louisgv louisgv pinned this issue Oct 4, 2022
@louisgv louisgv changed the title [RFC] centralized log in development [RFC] Centralized log in development Oct 6, 2022
@louisgv louisgv unpinned this issue Oct 8, 2022
@louisgv
Copy link
Contributor

louisgv commented Oct 8, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants