Facebook is releasing to open source an internal tool called Sonar, a debugging platform that the company’s engineers and developers use to share information and investigate bugs during the mobile-app development process.
The platform is outgrowth of the company’s previously released Stetho tool, which is an Android-specific debugging tool. Sonar is designed for both Android and iOS apps and it has a modular design that allows other developers to extend the platform’s functionality through plugins. The tool comprises a desktop client and a mobile SDK through which developers can write their own clients and mobile plugins.
Facebook designed the Sonar platform specifically to address the problems that come with distributed teams of developers all working on a single project.
“One challenge that comes from having many engineers working collaboratively on larger apps is that typically no single person knows how every module works. This segmentation of knowledge and expertise can make it difficult to develop new features, investigate bugs, or optimize performance,” Emil Sjolander, a software engineer at Facebook, wrote in a post on Sonar.
“To help engineers at Facebook manage this complexity, we built Sonar, an extensible cross-platform debugging tool. Sonar gives us a surface where framework experts and developers can convey important information to framework users.”
Developers using Sonar can install the mobile SDK inside the mobile app on which they’re working and that component will then send debugging information to the desktop client. The platform is meant to be extensible and Facebook’s internal engineers already have built a number of plugins for it, which also are part of the open source release.
“By working closely with framework and product developers inside Facebook from the start, we were able to ensure that our plugin APIs were powerful enough to build a wide range of tools. In fact, all the tools included in Sonar are themselves plugins; the core of Sonar only provides a set of UI components and manages the connection between devices. This means anyone can build equally powerful tools as custom plugins,” Sjolander said.