To diagnose a heart arrhythmia it needs to be “captured” on some type of heart rhythm recording.

ECG is one of the options. Which records electrical signals traveling through the heart and therefore detects arrhythmia.