หาบั๊กและอธิบายสาเหตุ

A ready-to-use “Programming” AI prompt template, designed and tested with Cursor. Replace the (bracketed) parts below with your own needs.

Prompt template
โค้ดของฉันทำงานไม่เป็นไปตามที่คาด ช่วย: 1) หาปัญหาที่น่าจะเป็นไปได้มากที่สุด; 2) อธิบายว่าทำไมถึงเกิด (อธิบายหลักการให้ชัด); 3) ให้โค้ดที่แก้แล้ว; 4) เตือนฉันว่าจะเลี่ยงข้อผิดพลาดแบบนี้ในอนาคตได้อย่างไร หากข้อมูลไม่พอ ให้ถามก่อนว่าต้องเพิ่มอะไร

พฤติกรรมที่คาดหวัง: "อธิบาย"
พฤติกรรมจริง: "อธิบาย"
โค้ด:
```
วางโค้ด
```

How to use this prompt

  1. Copy the whole prompt above and paste it into Cursor or ChatGPT / Claude / Gemini.
  2. Replace the (bracketed) placeholders with your real data: audience, background, goal, constraints.
  3. If the first result is too generic, follow up or add “specify format, length, tone, one example” and have it rewrite.

Recommended tool: Cursor — A code editor built for AI.