A substantial fraction of the stellar mass growth across cosmic time occurred within dust-enshrouded environments. Yet, the exact amount of star-forming activity that took place in high-redshift dusty galaxies currently missed by optical surveys has been barely explored. Using the Spitzer observations of COSMOS we determined the fraction of luminous star-forming galaxies at 1.5<z<3 escaping the traditional color selection techniques because of dust extinction, as well as their contribution to the cosmic star formation density at high redshift. We find that the BzK criterion offers an almost complete (~90%) identification of the 24mic sources at 1.4<z<2.5, while the BM/BX criterion miss 50% of the MIPS population. Similarly the criterion based on the presence of a stellar bump in massive sources (so-called IRAC peakers) miss up to 40% of the IR luminosity density and only 25% of the IR energy density at z~2 is produced by Optically-Faint IR-bright galaxies selected based on their extreme mid-IR to optical flux ratios. We conclude that color selections of distant star-forming galaxies must be used with lots of care given the substantial bias they can suffer. In particular, the effect of dust extinction strongly impacts the completeness of identifications at the bright end of the bolometric luminosity function, which implies large and uncertain extrapolations to account for the contribution of dusty galaxies missed by these selections. In the context of forthcoming facilities that will operate at long wavelengths (e.g., $JWST$, ALMA, SAFARI, EVLA, SKA), this emphasizes the importance of minimizing the extinction biases when probing the activity of star formation in the early Universe.