The days of Googling error messages are over. An LLM doesn't search for your bug; it computes the exact mathematical resolution based on your specific stack trace and environment.
1The Raw Trace Injection
When your terminal explodes in red text, do not try to summarize it. Humans are terrible at summarizing errors; they leave out the exact line number where the failure originated. Simply copy the entire, raw 50-line stack trace from your terminal and paste it into the AI chat. The AI's attention mechanism will instantly lock onto the exact file and function causing the crash.
Error: Connection refused
at Dial (net.go:120)
at connect (db.ts:43)
2Diagnosing Silent Bugs
The hardest bugs do not throw errors; they just produce the wrong result (e.g., calculating $10 instead of $20). For these 'Silent Bugs', use AI Rubber Ducking. Attach the file and explain the symptom: 'The user clicks checkout, but the cart total is wrong.' Command the AI: 'Walk me through the state changes of the cart array step-by-step.' The AI will trace the logic and find the exact line where the math fails.
"Price doubles on addToCart. Here is @cart.ts.
Analyze the state transitions."
3Generating Telemetry
If you cannot figure out why a massive asynchronous function is failing, you need visibility. Do not manually type console.log('here 1'). Highlight the entire function, press Ctrl+K (Inline Edit), and type: 'Add detailed console.logs for every variable state change and catch block.' The AI will inject highly descriptive, formatted logs. Run the code, read the terminal, find the bug, and then ask the AI to remove the logs.
// Injects console.logs automatically
