The current approach to connected and autonomous driving function development and evaluation uses model-in-the-loop simulation, hardware-in-the-loop simulation and limited proving ground use, followed by public road deployment of the beta version of software and technology. The rest of the road users are involuntarily forced into taking part in the development and evaluation of these connected and autonomous driving functions in this approach. This is an unsafe, costly and inefficient method. Motivated by these shortcomings, this paper introduces the Vehicle-in-Virtual-Environment (VVE) method of safe, efficient and low-cost connected and autonomous driving function development, evaluation and demonstration. The VVE method is compared to the existing state-of-the-art. Its basic implementation for a path-following task is used to explain the method where the actual autonomous vehicle operates in a large empty area with its sensor feeds being replaced by realistic sensor feeds corresponding to its location and pose in the virtual environment. It is possible to easily change the development virtual environment and inject rare and difficult events which can be tested very safely. Vehicle-to-Pedestrian (V2P) communication-based pedestrian safety is chosen as the application use case for the VVE in this paper, and corresponding experimental results are presented and discussed. A no-line-of-sight pedestrian and vehicle moving towards each other on intersecting paths with different speeds are used in the experiments. Their time-to-collision risk zone values are compared for determining severity levels. The severity levels are used to slow down or brake the vehicle. The results show that V2P communication of pedestrian location and heading can be used successfully to avoid possible collisions. It is noted that actual pedestrians and other vulnerable road users can be used very safely in this approach.