pattern-debug
Debug pattern errors systematically
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
Debug Pattern
Use Skill("ct") for ct CLI documentation if debugging deployment or charm issues.
Read First
-
docs/development/debugging/workflow.md- 5-step debugging process -
docs/development/debugging/README.md- Error reference matrix
Process
-
Check TypeScript errors:
deno task ct check pattern.tsx --no-run -
Match error to documentation:
- Read the error message carefully
- Check
docs/development/debugging/README.mdfor matching errors
-
Check gotchas:
-
docs/development/debugging/gotchas/handler-inside-pattern.md -
docs/development/debugging/gotchas/filter-map-find-not-a-function.md -
docs/development/debugging/gotchas/onclick-inside-computed.md
-
-
Simplify to minimal reproduction:
- Comment out code until error disappears
- Add back piece by piece to find root cause
-
Fix and verify:
- Apply fix
- Run tests to confirm
Common Issues
Handler defined inside pattern body:
- Move handler() to module scope
- Only bind it inside pattern:
onClick={myHandler({ state })}
Type errors with Writable/Default:
- Check if field needs write access → use Writable<>
- Check if field could be undefined → use Default<T, value>
Action not triggering:
- Ensure Output type includes action as Stream
- Use .send() not .get() to trigger
Done When
- Root cause identified
- Error fixed
- Tests pass again
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-01-20
- Mise à jour de l’index
- 2026-01-26
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!