The prominent visions of wireless sensor networks that appeared about a decade ago have spurred enormous efforts in research and development of this new class of wireless networked embedded systems. Despite the significant effort made, successful deployments and real-world applications of sensor networks are still scarce, labor-intensive and oftenn cumbersome to achieve. In this article, we survey prominent examples of sensor network deployments, their interaction with the real world and pinpoint a number of potential causes for errors and common pitfalls. In the second half of this work, we present methods and tools to be used to pinpoint failures and understand root causes. These instrumentation techniques are specifically designed or adapted for the analysis of distributed networked embedded systems at the level of components, sensor nodes, and networks of nodes.