Formaldehyde (H2CO) and its deuterated forms can be produced both in the gas phase and on grain surfaces. However, the relative importance of these two chemical pathways is unclear. Our recent single dish observation of formaldehyde and its deuterated species suggests that they form mostly on grain surfaces although some gas-phase contribution is expected at the warm HMPO stage. Since the single dish beam is larger, and since these high-mass star-forming regions are clustered and complex, it is however unclear whether the emission arises from the protostellar sources or from starless/pre-stellar cores associated with them. Therefore, interferometric observations are needed to separate the emission originating from the small and dense cores, to disentangle their formation routes and then being able to use them as powerful diagnostic tools of the physical and chemical properties of high-mass star forming regions.