Facebook open source its debugging platform Sonar: support Android & iOS
Facebook announced on its official website that it officially open source Sonar for its internal mobile application debugging platform.
Sonar is a platform for debugging iOS and Android mobile apps. Through a simple interface, developers can visually review and control their apps. In addition to being used directly, Sonar also supports the use of plug-in APIs for extensions. Three years ago, Facebook had already open sourced an Android debugging bridge Stetho based on the Chrome Developer Tools. The Sonar released this time is more advanced than it is, mainly reflected in the cross-platform, richer user experience, and the most important scalability. Developers are advised to use Sonar instead of Stetho.
According to Facebook, Sonar has been used in many internal projects, some of which use examples include:
- Providing our engineers with access to a view hierarchy that more accurately resembles the features and functionality they are working with, by showing Litho and ComponentKit components.
- Surfacing a stream of GraphQL requests, as opposed to raw network events.
- Tracking performance markers in real time, allowing developers to more easily investigate performance problems.
Image: Facebook
Sonar consists of two parts: the desktop client and the mobile SDK. The Sonar user interacts with the desktop client, and the mobile SDK is installed in the Android or iOS application that the engineer wants to debug and then transfers the data to the Sonar desktop client. The desktop client is based on open source projects from Electron and Facebook, including React.js, Flow, Metro, RSocket, and Yarn; the mobile SDK also makes heavy use of Facebook’s open sources projects such as Folly and RSocket.