How do I test that Sentry is reporting errors?

Rob picture Rob · Nov 16, 2017 · Viewed 13k times · Source

I just installed Sentry for a client-side JavaScript app using the standard code snippet they provided. How do I test that it's working properly? I've tried manually throwing an error from my browser console and it didn't appear in Sentry. Is there any documentation on the right way to do this?

Answer

Leo picture Leo · Apr 24, 2019

Verify (newer)

myUndefinedFunction();

Verifying Your Setup (older)

Sentry.captureException(new Error("This is my fake error message"));

https://docs.sentry.io/platforms/javascript/?platform=browser#verifying-your-setup

May be worth double-checking your setup (or updating) and config too.