A disordered quantum system of interacting particles exhibits localized behavior when the disorder is large compared to the interaction strength. Studying this phenomenon on a quantum computer with no, or limited, error correction is challenging because even weak coupling to a thermal environment destroys most signatures of localization. Fortunately, spectral functions of local operators are known to contain features that can survive the presence of noise. In these spectra, discrete peaks and a soft gap at low frequencies compared to the thermal phase indicate localization. Here, we present the computation of spectral functions on a trapped-ion quantum computer for a one-dimensional Heisenberg model with disorder. Further, we design an error-mitigation technique which is effective at removing the noise from the measurement allowing clear signatures of localization to emerge as the disorder increases. Thus, we show that spectral functions can serve as a robust and scalable diagnostic of many-body localization on current and future generations of quantum computers.