Background. Gait and cognitive functions can deteriorate during dual tasking, especially in people with neurological deficits. Most studies examining the simultaneous effects of dual tasking on motor and cognitive aspects were not performed in ecological environments. Using virtual reality technology, functional environments can be simulated to study dual tasking. Objectives. The aims of this study were to test the feasibility of using a virtual functional environment for the examination of dual tasking and to determine the effects of dual tasking on gait parameters in people with stroke and age-matched controls who were healthy. Design. This was a cross-sectional observational study. Methods. Twelve community-dwelling older adults with stroke and 10 age-matched older adults who were healthy participated in the study. Participants walked on a self-paced treadmill while viewing a virtual grocery aisle projected onto a screen placed in front of them. They were asked to walk through the aisle (single task) or to walk and select ("shop for") items according to instructions delivered before or during walking (dual tasking). Results. Overall, the stroke group walked slower than the control group in both conditions, whereas both groups walked faster overground than on the treadmill. The stroke group also showed larger variability in gait speed and shorter stride length than the control group. There was a general tendency to increase gait speed and stride length during dual-task conditions; however, a significant effect of dual tasking was found only in one dual-task condition for gait speed and stride duration variability. All participants were able to complete the task with minimal mistakes. Limitations. The small size and heterogeneity of the sample were limitations of the study. Conclusions. It is feasible to use a functional virtual environment for investigation of dual tasking. Different gait strategies, including an increase or decrease in gait speed, can be used to cope with the increase in cognitive demands required for dual tasking.