The purpose of this study is to characterize the attention deficits in a sample in these 2 types of clinical profiles through a continuous execution test in virtual reality. Methods: A total of 115 participants were recruited by consecutive sampling. The experimental sample was collected from patients diagnosed with depression and anxiety. The three tests that have been used for this study are Nesplora Aquarium, BDI and STAI. Results: Here, we show that significant differences (CI = 95%) can be seen between the control group and the group with depression in the variables related to the speed of visual processing (V_correctreactime_mean, p = 0.008) in the absence of distractors (S_correctreactime_mean, p = 0.041) and during the first dual execution task (XnoDUALab_correctreactime_mean, p = 0.011). Unlike in the clinical depression group, no significant differences were observed in any of the variables related to the processing speed of patients with anxiety disorders, compared to control subjects. If significant differences (CI = 95%) can be seen between the control group and the anxiety group in all variables related to the level of attentional arousal, that would indicate a lower performance of the clinical group with anxiety in this function. Both patients with depression and anxiety did not differ from controls in scores related to sustained attention. Conclusions: Therefore, our results suggest that attentional deficits are present in both clinical populations when performing a continuous execution test with dual execution components that involve the participation of the central executive system of working memory.