Spectroscopic characterization of the on-surface induced (cyclo)dehydrogenation of a N-heteroaromatic compound on noble metal surfaces.