print-debugging
/print-debugging
Place labeled, greppable print statements at decision points to trace the real execution, then remove them cleanly. Use when a debugger is unavailable or awkward and you need to watch values flow through the actual run.
- Author
- Amey-Thakur ↗
- Repository
- AI-SKILLS ↗
- Licence
- MIT
- Last repository change
- 05.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 05.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Place labeled, greppable print statements at decision points to trace the real execution, then remove them cleanly. Use when a debugger is unavailable or awkward and you need to watch values flow through the actual run.
Original author description
Place labeled, greppable print statements at decision points to trace the real execution, then remove them cleanly. Use when a debugger is unavailable or awkward and you need to watch values flow through the actual run.
How it works
- Method
- Litmus tests
- Boundaries
SKILL.md preview
---
name: print-debugging
description: Place labeled, greppable print statements at decision points to trace the real execution, then remove them cleanly. Use when a debugger is unavailable or awkward and you need to watch values flow through the actual run.
---
# Print debugging
The oldest tool still earns its keep. When you cannot attach a debugger to a
build agent, a container, or a race that only shows at full speed, a print
statement reports what actually ran. Done carelessly it drowns the signal and
leaks into the commit. Done well it is a fast, honest trace you can diff.
## Method
1. **Tag every line so it is greppable.** Print `>>> parse:42 rate=` with the
value, never a bare number. When ten lines scroll past, an untagged `0.0`
tells you nothing about where it came from.
2. **Print the value and its type together.** `print("qty", qty, type(qty))`.
Half of all print-debugging surprises are a string where you expected an
integer, and the type gives it away instantly.
3. **Sit prints on boundaries, not at random.** Log each value entering and
leaving the suspect function. Right on entry and wrong on exit means the bug
lives inside that function, and you have bracketed it in two lines.
4. **Make the output diffable.** Emit one key-value pair per line in a stable
order, run the good case and the bad case, and `diff` the two logs. The first
differing line is where behavior forks.
5. **Prefix a sentinel that never appears in real code.** Start each debug line
with a token like `ZZDEBUG`. `grep ZZDEBUG` finds them in the output, and the
same search guarantees you can remove every one later.
6. **Flush, and use stderr when order matters.** Buffered stdout can reorder or
swallow lines when the program crashes. Print to stderr with
`flush=True` so the last line before a segfault actually reaches you.
7. **Delete them the instant the bug is found.** Grep the sentinel and strip
every hit before committing. A stray debug print in shared code is noise for
the next reader and a data leak in production logs.
## Litmus tests
- Can you name the source line behind each output line from its tag alone?
- Do the good-run and bad-run logs diff cleanly to one first divergence?
- Does `grep` for your sentinel return zero hits before you commit?
## Boundaries
For stepping through call stacks, inspecting live objects, or stopping only on
a condition, a real debugger is faster: see debugger-fluency. Prints meant to
survive as intentional observability belong behind a logging framework, not
left as raw stdout.
Versions
The database has no other skills named print-debugging.
Database snapshot: 13.11.2026 · package version e75c1947bcda (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100godot-debugging
Use when debugging Godot projects — remote debugger, print techniques, signal tracing, common error patterns and fixes - 100godot-debugging
Use when debugging Godot projects — remote debugger, print techniques, signal tracing, common error patterns and fixes - 100godot-debugging-profiling
Expert debugging workflows including print debugging (push_warning, push_error, assert), breakpoints (conditional breakpoints), Godot Debugger (stack trace, variables, remote debug), profiler (time profiler, memory monitor), error handling patterns, and performance optimization.… - 100logging-setup
Generates structured logging infrastructure using os.log/Logger to replace print() statements. Use when user wants to add proper logging, replace print statements, or set up app logging. - 100debugger
Use this agent when you need to diagnose and fix bugs, identify root causes of failures, or analyze error logs and stack traces to resolve issues. - 100debugger
Advanced debugging specialist for diagnosing and resolving code issues. Use when user encounters bugs, errors, unexpected behavior, or mentions debugging.