Skip to content

Expose PHP errors with JavaScript events #665

@adamziel

Description

@adamziel

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
});

Metadata

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions