UPDATED 14:53 EST / JUNE 11 2018

APPS

Facebook open-sources Sonar mobile debugging tool for iOS and Android

Facebook Inc. today announced the open-source release of Sonar, an extensible mobile debugging tool for developers designed to give programmers a better idea of what their app is doing.

The software expands on an Android debugging tool based on Google Chome’s developer platform. Sonar rises from the same concept, but does so by providing an extendable platform that developers can add plugins to, develop new features, investigate bugs and optimize apps.

“This initiative started more than three years ago with the release of Stetho, an Android debugging bridge built on Chrome’s developer tools,” Emil Sjölander, Facebook software engineer, wrote in the announcement.

“With Sonar, we wanted to build upon what we’ve learned with Stetho to design a tool that was more extensible to new features,” Sjölander said, “had a richer user experience, and worked across both iOS and Android.”

Sonar is now available for the developer community at large, not just Facebook engineers, as an open-source software project via GitHub.

The debugging tool works cross-platform, allowing developers to connect mobile devices — running Android and iOS or an emulator — to a desktop client that can guide and interpret a running app. This provides developers a deep inspection capability that can show what an app is doing and what’s happening to better understand bugs and system capabilities.

The impetus behind developing Sonar sought extensibility, because of this, Sonar’s open source release comes with a multitude of plugins developed by Facebook engineers.

For example, Sonar ships with several built-in plugins including: Logs, a plugin that shows device logs without the need for additional setup; Layout Inspector, a debugging platform that provides deep dives into user interface hierarchies and supports Litho and ComponentKit components; and Network, a plugin that enables the inspection of network packets as they pass into and out of the app in question.

Sonar is made up of two components: a desktop client used to provide control and a software development kit installed on the mobile device used to instrument and inspect the app.

The desktop client is built atop Electron, an open source library developed by GitHub for building cross-platform applications, and Facebook open source projects, including React.js, Flow, Metro, RSocket and Yarn.

Developers can rapidly develop plugins for Sonar by writing a user interface component for the desktop app and a mobile SDK plugin to run on the device. The desktop side of the software is written in React and the mobile side can be written in a language native to the device meaning Swift and Objective-C on iOS or Java andKotlin on Android.

“We hope that open-sourcing Sonar and the accompanying plugins will provide a useful tool for other engineers working on mobile applications,” Sjölander said. “These plugins can be easily integrated into existing apps using Sonar’s SDK with just a few lines of code.”

Sjölander concluded that Sonar has proved extremely useful to engineers at Facebook internally and that the Facebook team hopes that it will prove useful to the open-source community.

Image: Facebook

A message from John Furrier, co-founder of SiliconANGLE:

Your vote of support is important to us and it helps us keep the content FREE.

One click below supports our mission to provide free, deep, and relevant content.  

Join our community on YouTube

Join the community that includes more than 15,000 #CubeAlumni experts, including Amazon.com CEO Andy Jassy, Dell Technologies founder and CEO Michael Dell, Intel CEO Pat Gelsinger, and many more luminaries and experts.

“TheCUBE is an important partner to the industry. You guys really are a part of our events and we really appreciate you coming and I know people appreciate the content you create as well” – Andy Jassy

THANK YOU