To investigate whether acid reflux is involved at all, doctors can do a 24-hour pH test, inserting an acid-sensitive probe through the patient's nose into the esophagus, where it records any episodes of reflux.
WSJ: Why Your Heartburn Drugs Don't Work