DESIGN XSTREAM / DESIGNER TO BUILDER
FREE LESSON · Chapter 18: Errors and debugging
AI wrote your app. Now something broke.
A calm debugging method for designers using AI coding tools.
TRY IT
contrastRatio('#17131F')One colour supplied. The function expects two.
An illustration of a missing-input bug from the book.
Make sense of what happened.
01 / Read the kind
TypeError tells you that a value was used in a way it did not support. It is a clue, not a diagnosis by itself.
02 / Find the location
Read the file and line number. Then follow the function calls to understand where the unexpected value came from.
03 / Check the inputs
In this example, contrastRatio needs two colours. Giving it one leaves the second input undefined. Fix the missing input, then repeat the original action.
The idea in a few lines
contrastRatio('#17131F')
// Missing the second colour.
contrastRatio('#17131F', '#FFFCF5')
// Supply both colours.Try this with your AI agent
Expected: [what should happen]. Actual: [what happens]. Steps: [how to reproduce]. Error: [exact text]. Find the cause first. Propose the smallest fix and a check that reproduces the original failure. Avoid unrelated changes.
You can also select and copy the text above.
Fix the cause. Repeat the action. Check the result.
CONTINUE WITH THE FULL BOOK
Understand what your AI builds.
Designer to Builder explains code foundations, the terminal, Git, debugging and AI coding agents through concepts you already know as a designer.
- Illustrated explanations and code read line by line.
- Practical prompts and a build-and-ship capstone.
- Contrast Buddy source code included with the book.
See the current price, included files and purchase terms on Gumroad.
By Jophin Joy / Design Xstream. This free introduction adapts lessons from Designer to Builder. No email signup required.