How do I test that Sentry is reporting errors?

The browser console can not be used as it is sandboxed. A simple trick is to attach the code to an HTML element like this:

<h1 onClick="throw new Error('Test')">
  My Website
</h1>

And click on the heading afterwards.

This can be done in the browser inspector and so your source code doesn’t have to be modified.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)