@sentry/browser
@sentry/node
raven-js
raven-node
_(raven for node)_5.4.0
Describe your issue in detail, ideally, you have a reproducible demo that you can show.
When using console
in development, Sentry adds it to breadcrumbs. It is impossible to use console
for debugging now since the browser console shows the line from Sentry source code for breadcrumbs as the event originator. The only workaround I found so far was to disable Sentry completely, ignoring the breadcrumb type in beforeBreadcrumb
did not work either.
In Chrome: Devtools => Settings => Blackboxing => add sentry sdk bundle
// or
Per config:
if (development) {
Sentry.init({
dsn: '__dsn__',
integrations: [new Sentry.Integrations.Breadcrumbs({
console: false
})]
})
} else {
// regular Sentry config
}
Thank you @kamilogorek !
Instead of doing if else, you can also do like this:
init({
dsn: '__dsn__',
...(development && {
integrations: [
new Sentry.Integrations.Breadcrumbs({ console: false }),
],
}),
// regular Sentry config
Well if we want to play with the syntax, we can do
Sentry.init({
dsn: '__dsn__',
integrations: [
development && new Sentry.Integrations.Breadcrumbs({
console: false
}),
].filter(Boolean),
})
to be perfect, but yes, this worked for me. Thanks again @kamilogorek !
Most helpful comment
Well if we want to play with the syntax, we can do
to be perfect, but yes, this worked for me. Thanks again @kamilogorek !