Background: Continuous performance tasks (CPTs) embedded in a virtual reality (VR) classroom environment have been shown to be a sensitive and user-friendly assessment tool to detect cognitive deficits related to attention-deficit/hyperactivity disorder (ADHD). The aim of the current study was to compare the performance of children with ADHD on a VR-CPT while on and off treatment with methylphenidate (MPH) and to compare the VR-CPT to a currently used CPT, Test of Variables of Attention (TOVA). Methods: Twenty-seven children with ADHD underwent the VR-CPT, the same CPT without VR (no VR-CPT), and the TOVA, 1 hour after the ingestion of either placebo or 0.3 mg/kg MPH, in a double-blind, placebo-controlled, crossover design. Immediately following CPT, subjects described their subjective experiences on the Short Feedback Questionnaire. Results: MPH reduced omission errors to a greater extent on the VR-CPT compared to the no VR-CPT and the TOVA, and decreased other CPT measures on all types of CPT to a similar degree. Children rated the VR-CPT as more enjoyable compared to the other types of CPT. Conclusions: It is concluded that the VR-CPT is a sensitive and user-friendly assessment tool in measuring the response to MPH in children with ADHD.