Lesson 6
Text Diff Debugging Workflow
Use ignore whitespace/case, swap sides, and choose text diff vs JSON diff intentionally.
When a comparison looks noisy or confusing, treat diff review like debugging: reduce variables, compare the smallest useful sample, and pick the right tool.
A practical workflow
- Paste original text on the left and modified text on the right.
- Start with side-by-side line diff.
- Read the change summary: added, removed, changed, unchanged.
- If only a few lines changed, switch to word-level highlighting.
- If whitespace or casing creates false changes, enable ignore options.
- If you pasted the sides in the wrong order, swap them.
- Copy the diff summary into your note, ticket, or review comment.
When to ignore whitespace or case
Enable ignore whitespace when:
- One file has trailing spaces
- Indentation changed but values did not
- Copy/paste introduced extra blank lines at the edges
Enable ignore case when:
- Environment labels differ only by casing
- Header names or enum-like values should be treated as equivalent
- You want to focus on semantic content, not formatting
Do not ignore whitespace/case when exact bytes matter, such as HMAC inputs, signed payloads, or case-sensitive paths.
Text diff vs JSON diff
Choose intentionally:
- Text diff: configs, logs, env files, curl output, mixed text, partial payloads
- JSON diff: parsed JSON objects where field paths and nested structure matter
If JSON diff reports many changes but text diff shows only one line, the issue may be key ordering or formatting—not business data.
Common failure signs
- Everything looks changed: check key order, whitespace, or whether you compared unrelated files.
- Nothing looks changed but behavior differs: compare a larger sample or a different layer (headers, env, response body).
- Diff is too large for the browser: trim to the relevant section first.
Key takeaway
Good diff review is disciplined: smallest sample, correct view, correct highlight mode, correct ignore settings, and the right comparison tool for the data shape.
The Text Diff Checker is designed for this workflow: local processing, side-by-side/unified views, word-level highlights, ignore options, swap, and copy actions in one workspace.