{"record":{"id":"82d83def00c3368f","repo":"mobxjs/mobx","slug":"warning-debug-feature-only-mobx-will-not-recover","errorCode":null,"errorMessage":"WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled.","messagePattern":"WARNING: Debug feature only\\. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/mobx/src/api/configure.ts","lineNumber":44,"sourceCode":"    if (enforceActions !== undefined) {\n        const ea = enforceActions === ALWAYS ? ALWAYS : enforceActions === OBSERVED\n        globalState.enforceActions = ea\n        globalState.allowStateChanges = ea === true || ea === ALWAYS ? false : true\n    }\n    ;[\n        \"computedRequiresReaction\",\n        \"reactionRequiresObservable\",\n        \"observableRequiresReaction\",\n        \"disableErrorBoundaries\",\n        \"safeDescriptors\"\n    ].forEach(key => {\n        if (key in options) {\n            globalState[key] = !!options[key]\n        }\n    })\n    globalState.allowStateReads = !globalState.observableRequiresReaction\n    if (__DEV__ && globalState.disableErrorBoundaries === true) {\n        console.warn(\n            \"WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled.\"\n        )\n    }\n    if (options.reactionScheduler) {\n        setReactionScheduler(options.reactionScheduler)\n    }\n}\n","sourceCodeStart":26,"sourceCodeEnd":52,"githubUrl":"https://github.com/mobxjs/mobx/blob/01211a698b64ea94de8e5f276ff8235fcf8ddf96/packages/mobx/src/api/configure.ts#L26-L52","documentation":"configure({ disableErrorBoundaries: true }) tells MobX to stop catching errors inside reactions/derivations so stack traces surface directly in the debugger. Because MobX's internal state can then be left corrupted after a thrown error, it is debug-only, and MobX prints this console warning when it is enabled in development builds.","triggerScenarios":"Calling `configure({ disableErrorBoundaries: true })` in a __DEV__ build; it is a console.warn (not a throw) emitted by configure().","commonSituations":"Debugging where an exception originates inside a computed or reaction; copied debug config left in committed code; test setup utilities enabling it for easier assertion of thrown errors.","solutions":["Remove `disableErrorBoundaries: true` from production/test configuration once debugging is done","Enable it only temporarily in local dev sessions","If it must stay in dev, gate it: only pass the option when process.env.DEBUG_MOBX is set"],"exampleFix":"// before\nconfigure({ disableErrorBoundaries: true })\n// after\nif (process.env.DEBUG_MOBX) configure({ disableErrorBoundaries: true })","handlingStrategy":"validation","validationCode":"// guard before enabling\nif (process.env.NODE_ENV === 'production') {\n    throw new Error('disableErrorBoundaries is debug-only and must not be enabled in production')\n}\nconfigure({ disableErrorBoundaries: true })","typeGuard":"function isSafeConfigureOptions(o: Record<string, unknown>): boolean {\n    return !o.disableErrorBoundaries || process.env.NODE_ENV !== 'production'\n}","tryCatchPattern":"null","preventionTips":["Never commit disableErrorBoundaries: true to shared config","Gate debug options behind environment flags","Audit configure() calls during code review","Revert debug settings before merging"],"tags":["mobx","configuration","debugging","console-warning"],"backgroundTag":"debug-only-config-enabled","analyzedSha":"01211a698b64ea94de8e5f276ff8235fcf8ddf96","analyzedAt":"2026-08-28T22:10:08.831Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}