Facebook releases Sonar debugging tool to the open source community

It is hoped the tool can help engineers accelerate app development.
Written by Charlie Osborne, Contributing Writer
File Photo

Facebook has released an internal debugging tool, Sonar, to the open source community.

On Monday, Emil Sjölander, Facebook software engineer said in a blog post that Sonar was developed for and by Facebook engineers to help them manage the social network, including the implementation of new features, bug hunting, and performance optimization.

Now, Sonar is being released to the open source community in the hopes of giving programmers a tool for the acceleration of app development and deployment.

"With Sonar, engineers have a highly flexible, intuitive way to inspect and understand the structure and behavior of their iOS and Android applications," Sjölander says. "We believe Sonar improves on current tools by providing a more visual and interactive experience that is extensible to fit engineers' specific needs."

The extensible cross-platform debugging tool, based on Stetho, takes the latter's most promising elements and improves upon it.

Made up of a desktop client and mobile SDK, Sonar can be used by developers to inspect app layouts -- whether or not the apps were built with standard Android/iOS views or Litho/ComponentKit components -- as well as inspect both logs and network traffic.

See also: Linux Foundation: Microsoft's GitHub buy is a win for open source

Some of the tool's use cases at Facebook include surfacing GraphQL request streams and tracking performance markers.

Considering the vast Facebook platform, Sonar was built to cope with an array of different components and use-cases -- and so the tool includes a range of plugins for both generic and Facebook-based functions.


Facebook recommends that developers use Sonar in place of Stetho, except in cases where specific features have not been implemented in Sonar, such as command-line tools based on dumpers.

"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," the software developer says. "This means anyone can build equally powerful tools as custom plugins."

TechRepublic: Cisco Live 2018: Developers, security, and Google Cloud take center stage

Sonar and the software's accompanying plugins can be integrated into existing applications through the Sonar SDK.

The tool can be downloaded from GitHub.

"As we've already seen Sonar prove useful internally at Facebook, we think Sonar's APIs will help other engineers build great new experiences to improve their workflows," Sjölander says. "We look forward to seeing what the community will create, and over the coming months, we will continue working to improve the core of Sonar and expand the range of APIs available to plugin developers."

The top open-source rookies, projects in 2018

Previous and related coverage

Editorial standards