ทำความเข้าใจข้อความ error ที่งงและแก้ปัญหาทีละขั้น
A ready-to-use “Programming” AI prompt template, designed and tested with GitHub Copilot. Replace the (bracketed) parts below with your own needs.
Prompt template
ฉันเจอ error ตอนรันโค้ดและเข้าใจไม่ค่อยได้ ในฐานะวิศวกรอาวุโส ช่วยพาฉันหาสาเหตุและแก้ทีละขั้น สิ่งที่ฉันกำลังทำ: (เช่น รันสคริปต์ Python / เริ่มโปรเจกต์) ภาษาหรือเฟรมเวิร์กและเวอร์ชัน: (ถ้าทราบ) ข้อความ error ทั้งหมด: (วางทั้งหมด รวมถึง traceback) โค้ดส่วนที่เกี่ยวข้อง: (วางส่วนที่อาจล้มเหลว) สิ่งที่ฉันลองแล้ว: (ถ้ามี) โปรด: 1. อธิบายด้วยภาษาที่เข้าใจง่ายว่า error นี้บอกอะไรจริง ๆ และสาเหตุที่เป็นไปได้มากที่สุด 2. จัดรายการจุดที่มีปัญหาที่เป็นไปได้มากที่สุด 2-3 จุด เรียงตามความน่าจะเป็น 3. ให้ขั้นตอนแก้ไขที่เป็นรูปธรรมและโค้ดที่แก้แล้ว 4. สอนฉันให้อ่าน error แบบนี้เองได้ครั้งหน้าและจะจำกัดวงหาสาเหตุอย่างไร ข้อจำกัด: ยืนยันสาเหตุก่อนให้วิธีแก้ อย่าสักแต่แก้มั่ว ระบุส่วนที่ไม่แน่ใจให้ชัดเจน
How to use this prompt
- Copy the whole prompt above and paste it into GitHub Copilot or ChatGPT / Claude / Gemini.
- Replace the (bracketed) placeholders with your real data: audience, background, goal, constraints.
- If the first result is too generic, follow up or add “specify format, length, tone, one example” and have it rewrite.
Recommended tool: GitHub Copilot — GitHub Copilot: The AI coding assistant born from a partnership between GitHub and OpenAI.