Read the error first
Before guessing or asking, read the actual error—it usually names the file and line.
Reproduce before you fix
Find the exact steps that trigger the bug before changing anything.
Isolate, then narrow
Cut the problem down to the smallest piece that still breaks.