On Monday, Emil Sjölander, a Facebook software engineer, said in a blog post that Sonar was developed for Facebook engineers in order to help them manage the social network, including implementing new features, troubleshooting and optimizing performance.
Facebook Launches Sonar Debugging Tool for Open Source Community
Sonar will now launch into the open source community in the hopes of providing developers with a tool for accelerating application development and deployment.
“With Sonar, engineers have a very flexible and intuitive way to inspect and understand the structure and behaviour of their iOS and Android applications,” says Sjölander. “We believe that Sonar enhances today’s tools by providing a more visual and interactive experience that is extensible to fit engineers’ specific needs.
The extensible multi-platform debugging tool, based on Stetho, takes the most promising elements of the latter and improves it.
Comprised of a desktop client and a mobile SDK, developers can use Sonar to inspect application layouts, whether the applications are built with standard Android/iOS views or Litho/ComponentKit components, as well as inspect records and traffic networks.
Some of the cases of use of the tool on Facebook include the emergence of GraphQL request sequences and the tracking of performance markers.
Given the large Facebook platform, Sonar was created to address a variety of different components and use cases, so the tool includes a range of add-ons for generic and Facebook-based features.
Facebook recommends that developers use Sonar instead of Stetho, except in cases where specific features not implemented in Sonar, such as dumper-based command line tools, have not been implemented.
“All the tools included in Sonar are themselves add-ons, the Sonar core only provides a set of user interface components and manages the connection between devices,” says the software developer. “This means that anyone can build equally powerful tools as custom add-ons.
Sonar and the add-ons that come with the software can be integrated into existing applications through the Sonar SDK.
The tool can be downloaded from GitHub.
“As we have already seen that Sonar is used internally on Facebook, we believe that the Sonar APIs will help other engineers create new experiences to improve their workflows,” says Sjölander. “We look forward to seeing what the community will create, and in the coming months, we will continue to work to enhance the Sonar core and expand the range of APIs available to developers.