fix: breakpoint not working (#8236)

This commit is contained in:
Curry Yang
2024-12-06 17:06:15 +08:00
committed by GitHub
parent dcf5ae9c07
commit 10f148671b
2 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import * as Sentry from '@sentry/electron/main';
import * as session from '../account/session';
import { isDevelopment } from '../common/constants';
import { type ChangeBufferEvent, database as db } from '../common/database';
import { SENTRY_OPTIONS } from '../common/sentry';
import * as models from '../models/index';
@@ -54,7 +55,7 @@ export function initializeSentry() {
*/
shouldSend: () => enabled,
},
integrations: [
integrations: isDevelopment() ? [] : [
Sentry.anrIntegration({ captureStackTrace: true }),
],
});

View File

@@ -1,5 +1,6 @@
import * as Sentry from '@sentry/electron/renderer';
import { isDevelopment } from '../common/constants';
import { SENTRY_OPTIONS } from '../common/sentry';
export function initializeSentry() {
@@ -10,7 +11,7 @@ export function initializeSentry() {
// set 0.1 sample rate for traces, only send 10% of traces, and check whether the limit is exceeded
// https://konghq.sentry.io/settings/billing/overview/?category=transactions
tracesSampleRate: 0.1,
anrDetection: {
anrDetection: isDevelopment() ? false : {
captureStackTrace: true,
},
});