From 46440ffdde50d4e0a1c01103c30bc82ba385b6c5 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Tue, 7 Apr 2026 22:36:08 +0700 Subject: [PATCH] feat(plugins/no-track): log attempts to set `__SENTRY__` in dev builds --- src/plugins/preinit/no-track/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/preinit/no-track/index.ts b/src/plugins/preinit/no-track/index.ts index 6c0d8da..2441850 100644 --- a/src/plugins/preinit/no-track/index.ts +++ b/src/plugins/preinit/no-track/index.ts @@ -5,6 +5,7 @@ import { instead } from '@revenge-mod/patcher' import { InternalPluginFlags, registerPlugin } from '@revenge-mod/plugins/_' import { PluginFlags } from '@revenge-mod/plugins/constants' import { noop } from '@revenge-mod/utils/callback' +import { getCurrentStack } from '@revenge-mod/utils/error' const cachedOnly = { cached: true, @@ -110,7 +111,10 @@ registerPlugin( Object.defineProperty(globalThis, '__SENTRY__', { configurable: false, get: getFakeCarrier, - set: getFakeCarrier, + set: () => { + if (__DEV__) warnSetSentry(getCurrentStack()) + return getFakeCarrier() + }, }) cleanup(unsubSU, unsubSIU, unsubSentryInst)