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

Expose PHP errors with JavaScript events #665

Closed
adamziel opened this issue Oct 6, 2023 · 3 comments · Fixed by #1035
Closed

Expose PHP errors with JavaScript events #665

adamziel opened this issue Oct 6, 2023 · 3 comments · Fixed by #1035

Comments

@adamziel
Copy link
Collaborator

adamziel commented Oct 6, 2023

Let's enable gathering PHP errors from Playground instances. This should be highly useful for monitoring any sort of live previews, and even for gathering error information from WordPress core itself.

Playground could surface PHP and JavaScript errors encountered by its users and become a great source of insights about WordPress stability

Playground could enable collecting not only stack traces and messages, but also:

  • Environment info (browser, php version, WordPress version)
  • The exact way WordPress was set up (which plugins, themes, which versions)
  • The exact list of user interactions before the error was triggerred

This information would help solve WordPress core issues and alert plugin authors.

Technically, the API could be:

playground.addEventListner('request.end', function(response) {
    // Inspect:
    // response.exitCode
    // response.errors
});
@adamziel adamziel changed the title Emit PHP errors with JavaScript events Expose PHP errors with JavaScript events Oct 13, 2023
@adamziel adamziel moved this to Problem statement in Playground Roadmap Shaping Oct 13, 2023
@adamziel adamziel moved this from Problem statement to Vetted ideas in Playground Roadmap Shaping Oct 17, 2023
@adamziel
Copy link
Collaborator Author

adamziel commented Feb 3, 2024

cc @bgrgicak

@bgrgicak bgrgicak self-assigned this Feb 5, 2024
@adamziel adamziel modified the milestone: PHP Feature Parity Feb 29, 2024
@bgrgicak bgrgicak linked a pull request Mar 1, 2024 that will close this issue
@bgrgicak
Copy link
Collaborator

bgrgicak commented Mar 1, 2024

The first phase of this is completed. PHP error logs are now visible in the browser console and we have a logger that can be used be Plaground.

@bgrgicak bgrgicak moved this to Ready in Playground Board Mar 1, 2024
@bgrgicak bgrgicak moved this from Ready to In progress in Playground Board Mar 1, 2024
@bgrgicak
Copy link
Collaborator

PHP errors can be viewed in browser console, and there is now a way to catch crashes https://wordpress.github.io/wordpress-playground/contributing/crash-reports

@github-project-automation github-project-automation bot moved this from In progress to Done in Playground Board Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants