Skip to main content
Accidental debug statements are developer-authored messages that do not describe application behavior, system state, or user activity. Examples include console.log("here"), print("debug"), and logger.info("asdf"). Tero classifies by message content; these statements appear at DEBUG, INFO, or any other severity level.

Signals

  • Placeholder messages such as got here, hello world, testing, or asdf.
  • Explicit cleanup notes such as TODO remove.
  • Bare variable dumps such as x = 42.
  • Profanity or informal phrases used as temporary debugging markers.
  • Messages with no stable operational meaning.

Example

Tero generates a policy to drop this specific log event:

Open PRs

Remove accidental debug statements from the codebase.
Fix this at the source: the statement should not exist in production code.

Detection notes

  • Tero evaluates message content rather than severity.
  • Tero flags common debug phrases, random character strings, cleanup notes, and bare variable dumps.
  • Detection is conservative for this category: Tero flags only logs that are clear accidents.
  • Tero excludes legitimate verbose logging when the message has operational meaning.