How do I log everything with sentry/raven-js

My setup was correct, except for the line:

window.onerror = Raven.process

For some reason I couldn't provoke any error to fire the logging event, but once I managed to simulate a real error, the logging worked just fine. The line:

Raven.config('https://@app.getsentry.com/', options).install();

does catch all errors.


It is important to realize that raven does not capture errors you trigger with the console. You need to put some error generating code directly in the page, or do something like this from the console:

window.setTimeout(function(){ foo() });

Also, i think that doing:

window.onerror = Raven.process

Is unnecessary, Raven already does that for you, in a much more advanced way.