Recently, increasing research attention has been directed toward wireless sensor networks: collections of small low-power nodes, physically situated in the environment, that can intelligently deliver high-level sensing results to the user. As the community has moved into more complex design efforts — large-scale, long-lived systems that truly require self-organization and adaptivity to the environment — a number of important software design issues have arisen. To make software robust, we must carefully observe its behavior and understand its failure modes. However, many of these failures are not manifested until deployment time. Channel and storage limitations make visibility into a deployed system difficult, hindering our understanding of failure modes. Simulation is difficult to apply; the network’s physical situatedness makes it sensitive to subtleties of sensors and wireless communication channels that are difficult to model. In this article we describe EmStar, a PC-based software framework that aims to make development easier by improving system visibility. EmStar’s novel execution environments encompass pure simulation, true in-situ deployment, and hybrid modes that combine simulation with real wireless communication and sensors situated in the environment.