Guides · ← All guides · Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team · 7 min read
Debug Mode Enabled in an Eval Configuration: What It Leaks
Debug mode is a confession booth: full tracebacks, configuration dumps and interactive consoles, offered to anyone who can reach the service. In an eval config it should never survive contact with a network.
The short answer: turn it off in anything reachable beyond localhost. A declared config with DEBUG = True or "debug": true is EvalEgress's debug_mode_enabled class (MEDIUM, weight 8). Debug surfaces leak internals — stack traces naming your files and dependencies, settings dumps that can include the very credentials the rest of the report is trying to protect, and in some frameworks an interactive console on the error page. Disable debug in the eval configuration, gate any debug tooling behind authentication, and verify with the free scan that the class is gone from the declared set.
What is debug mode?
Debug mode is a framework setting that trades safety for developer visibility: errors render with full tracebacks and local variables, settings and environment may be displayed on diagnostic pages, auto-reload and verbose logging switch on, and some frameworks expose an interactive debugger console. EvalEgress matches DEBUG = True and "debug": true declarations as class debug_mode_enabled, MEDIUM severity.
What does a debug page actually hand over?
Start with the traceback: file paths, function names, library versions — a map of your stack and a shopping list of its known vulnerabilities. Add the locals captured at the failure point, which in an eval harness routinely include the prompt, the dataset row, the tool arguments and, on a bad day, the credential the harness loaded at start-up, printed helpfully beside the error that a malformed test case triggered. Then the settings view, where present, dumps configuration wholesale. None of this requires an attacker to be clever; it requires them to send the harness one input it mishandles, which — in an evaluation — is the input's entire job description.
That is the eval-specific sting. Ordinary applications meet malformed input by accident; eval harnesses meet it by design, thousands of cases at a time, many crafted to provoke failure. Running that workload with debug mode on is volunteering for the leak at industrial scale, to an audience determined by your network classes: anyone who can reach the service, as the egress guide counts them.
Why does debug stay on in eval configs specifically?
Because evals fail constantly and debug is how you see why — so it is switched on during development of the harness, when the audience is the developer's own machine, and never revisited when the harness moves to a shared box or a production-adjacent network. Config copying spreads it further: the staging settings file, debug already on for a staging investigation, is cloned into the eval folder as a starting point. The setting is a leftover from a context where it was safe, preserved by the same copying that carries credentials and open rules into eval folders.
The fix preserves the benefit and removes the audience. Debug belongs in the local development copy of the config — the one bound to localhost, on the developer's machine — and the shared and deployed copies differ from it in exactly this line, managed as an explicit environment difference rather than an edit someone remembers to make. Environment files per context, with the production-shaped ones debug-free by template, end the recurrence; a scan before the run catches the exception on the day it happens.
How does debug mode compound other findings?
It is a multiplier with a modest solo weight. Alone on a localhost-bound harness it is nearly harmless — which is why the class is MEDIUM 8, not HIGH. Its danger is relational: debug output is how the audience for your other findings learns to use them. The traceback that names the internal service helps aim the open ingress; the settings dump that echoes an environment hands over the credential whose assignment the scanner flagged two cards earlier, this time with its value, defeating the redaction the report itself respected.
Read it in the report as a question about combinations: debug on, plus reachable (open bind or open ingress), plus credential-bearing config, is an incident itinerary. Any single leg removed breaks it, and debug is usually the cheapest leg to remove — one line, no architecture. That is why the pre-deployment checklist places it as a fast close in the final block before a run, not because it is minor, but because it is quick.
Worked example: Prairie Signal Telecom, scored end to end
Example. Prairie Signal, a fictional regional telecom, evaluated a support-chat model. The harness config came from staging with debug still on, the results viewer was bound to all interfaces on the shared eval box, and an API key for the staging support tool sat in the same folder. The scan returned:
| Finding | Class | Severity | Weight |
|---|---|---|---|
| Service API key (sk-) in the harness config | generic_api_key | HIGH | 15 |
| Debug mode enabled in the copied staging settings | debug_mode_enabled | MEDIUM | 8 |
| Service bound to 0.0.0.0 in the viewer config | open_binding | MEDIUM | 8 |
The arithmetic: 15 + 8 + 8 = 31 points of exposure, so the score is 100 − 31 = 69/100, grade C. Scoring uses EvalEgress's published weights — CRITICAL 25, HIGH 15, MEDIUM 8, LOW 3 — with grades at A ≥ 90, B ≥ 75, C ≥ 50 and D ≥ 25.
The team split the configs by context: a local development settings file (debug on, localhost only, never committed to the shared folder) and the shared eval settings (debug off, private bind). The staging API key was replaced with a dedicated eval key in the secrets manager. The re-scan reported zero findings — and the next harness failure, deliberately triggered by a malformed case, produced a clean error page that told the team the case number and nothing else, which turned out to be enough.
Close a debug_mode_enabled finding: the five actions
Keep debug where it is safe — local, or nowhere:
- Set debug off in every shared or deployed eval config. DEBUG = False / "debug": false is the default posture for anything another machine can reach.
- Move debug to the local-only config. Developers keep their visibility on their own machine, bound to localhost; the local file never travels into the shared eval folder.
- Make the difference structural, not remembered. Per-context config templates with debug off baked into the shared one, so safety does not depend on someone editing before a run.
- Check what debug already printed. If a debug surface was reachable, review whether error pages were served to anyone else — tracebacks that echoed configuration deserve a credential review.
- Re-scan before the run. Confirm debug_mode_enabled is absent from the declared set that will actually run; pair it with the bind and ingress checks in the same pass.
Debug mode is a development convenience with an audience problem. One line closes it, and keeping it closed is a template decision — the same discipline the checklist applies to the whole debug surface.
Keep checking the boundary
Run the free exposure scan on the files your next eval will run with. Compare plans, read the scoring documentation, and keep reading: what is eval-to-production exposure?, what is egress in AI evaluation?, pre-deployment eval safety checklist, how to stop an AI evaluation from reaching production secrets, debug routes declared in eval services, how EvalEgress scores eval exposure, how to read an EvalEgress report. EvalEgress is one of the Ingenious AI platforms.
Sources
- EvalEgress scoring documentation — the 16 finding classes, severity weights and declared-surface scope every judgement in this guide applies, published 2026.
- What Is Eval-to-Production Exposure? — the companion guide this page builds on, published November 7, 2026.
- The free EvalEgress scan — the declared-file scan this guide's checks are performed with.
Frequently asked questions
We need debug output to diagnose failing evals. Must we give it up?
No — keep it in the local development config on your own machine. What you give up is debug on shared, deployed or production-adjacent copies, where the audience is no longer just you.
Is debug mode dangerous if the service needs a login?
Less, not safe. Debug pages have historically bypassed or leaked around authentication, and logged-in eval users include anyone holding the run's credentials. The setting belongs off wherever the service is reachable.
Why is the weight only 8 if tracebacks can leak credentials?
Weights price the typical case: debug alone, on an internal harness, is a moderate exposure. Its compounding with open network classes is where the danger concentrates — the report lets you see the combination, which is the point of scanning the set together.
What about verbose logging rather than the debug flag?
The class matches the declared debug setting. Verbose logs are the same instinct in another file: keep them local, keep credentials out of them, and never archive them beside public results.
Does the class cover every framework's debug switch?
It matches the common declaration shapes — DEBUG = True and "debug": true. Other spellings exist; the habit the class teaches — debug off in shared configs — covers the spellings the pattern does not.