In this work, we investigate how the high-harmonic generation (HHG) spectrum is affected by electronic dephasing applied to the quantum state of the emitter. By means of a theoretical and computational protocol based on quantum chemistry and the theory of open quantum systems, i.e. the stochastic Schrödinger equation [J. Chem. Phys. 148, 204112 (2018)], a study of dephasing on the harmonics of hydrogen and argon atoms is reported here. This approach provides a wave function-based insight on the coherence time of harmonics, from a purely point of view of the quantum state of the system irradiated by a laser. Interplay between dephasing time and the pulse parameters, as intensity and frequency, is also investigated for hydrogen. A reasonable agreement with literature data on argon atom is found. Future work will focus on the application of this computational approach to study the possible effect of dephasing on the HHG spectrum of molecules, and to investigate the interplay between plasmons and dephasing in the plasmon-enhanced HHG spectrum of Ar atoms in presence of metallic nanotips [Nature 453, 757 (2008)].