From 8170697bbfd8b4de1b9d0b7762e4bda569190d5a Mon Sep 17 00:00:00 2001 From: James Salter Date: Wed, 27 Oct 2021 14:05:58 +0100 Subject: [PATCH] Add a global mxSendSentryReport so we can debug sentry from the console (#7042) --- src/@types/global.d.ts | 1 + src/sentry.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index 38f237b9c3..a9d8e9547f 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -99,6 +99,7 @@ declare global { mxSkinner?: Skinner; mxOnRecaptchaLoaded?: () => void; electron?: Electron; + mxSendSentryReport: (userText: string, issueUrl: string, error: Error) => Promise; } interface DesktopCapturerSource { diff --git a/src/sentry.ts b/src/sentry.ts index cfb0da324a..88abada17a 100644 --- a/src/sentry.ts +++ b/src/sentry.ts @@ -219,3 +219,5 @@ export async function initSentry(sentryConfig: ISentryConfig): Promise { tracesSampleRate: 1.0, }); } + +window.mxSendSentryReport = sendSentryReport;