Mobile Development 9 min read

DoraemonKit: A Comprehensive Mobile Development Debugging Toolkit

DoraemonKit is a comprehensive mobile debugging toolkit for iOS and Android, offering built‑in tools for app information, sandbox browsing, mock GPS, crash viewing, performance monitoring (FPS, CPU, memory, network), visual inspection, and easy integration via CocoaPods or Gradle, plus extensibility for custom modules.

Didi Tech
Didi Tech
Didi Tech
DoraemonKit: A Comprehensive Mobile Development Debugging Toolkit

DoraemonKit (DoKit) is a fully‑featured client‑side development assistant for iOS and Android applications. Named after the "Doraemon" cartoon character, it provides a wide range of tools that help developers test, debug, and optimize their apps without writing repetitive code.

Background

Many apps embed ad‑hoc testing features such as environment switching, frame‑rate monitoring, and memory/CPU inspection. These features are often implemented separately for each app, leading to duplicated effort. DoraemonKit was created to extract common utilities into a reusable SDK that can be easily integrated into any app while still allowing business‑specific tools to be added.

Key Benefits

1. Centralizes business testing code for unified management. 2. Provides a rich set of built‑in tools, eliminating the need to re‑implement common functionalities.

Built‑in Feature Modules

Common Tools

App information viewer – quickly view device, app, and permission details.

Sandbox browser – explore, delete, preview files and share them via AirDrop.

MockGPS – simulate location anywhere in China.

H5 portal – open arbitrary H5 pages for quick testing.

Crash viewer – print crash stack traces locally.

UI on background thread detector – locate UI operations running off the main thread.

Data cleaner – one‑click removal of all sandbox data.

NSLog redirect – display NSLog output inside the app UI.

Lumberjack integration – show CocoaLumberjack logs in‑app.

Performance Monitoring

FPS – waveform view of frame rate.

CPU – waveform view of CPU usage.

Memory – waveform view of memory consumption.

Network – intercept and visualize internal traffic, similar to Charles.

Stutter detection – capture call stacks when the app freezes.

Custom monitoring – select any combination of FPS, CPU, memory, or network and export data.

Load time – list the execution time of all +load functions for startup optimization.

Visual Tools

Color picker – inspect UI component colors.

Component inspector – view name, position, background, font size, etc.

Alignment ruler – capture screen coordinates and check component alignment.

Element border – draw borders around UI elements for layout reference.

How to Use

iOS Integration Guide

1. Add the required CocoaPods subspecs (Core is mandatory). Example:

pod 'DoraemonKit/Core', '~> 1.1.7', :configurations => ['Debug']
pod 'DoraemonKit/WithLogger', '~> 1.1.7', :configurations => ['Debug']
pod 'DoraemonKit/WithGPS', '~> 1.1.7', :configurations => ['Debug']
pod 'DoraemonKit/WithLoad', '~> 1.1.7', :configurations => ['Debug']

2. Initialize DoraemonKit in application:didFinishLaunchingWithOptions: (only in Debug builds):

#ifdef DEBUG
#import
#endif

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    #ifdef DEBUG
        [[DoraemonManager shareInstance] install];
    #endif
    return YES;
}

3. (Optional) Add custom test modules to the Doraemon panel – see the official documentation for details.

Android Integration Guide

1. Add Gradle dependencies (debug implementation for the full kit, release implementation for a no‑op version):

dependencies {
    // ... other dependencies
    debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:1.1.3'
    releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:1.1.3'
    // ...
}

2. Initialize DoraemonKit in the Application class:

@Override
public void onCreate() {
    super.onCreate();
    DoraemonKit.install(this);
    // Optional: H5 portal callback
    DoraemonKit.setWebDoorCallback(new WebDoorManager.WebDoorCallback() {
        @Override
        public void overrideUrlLoading(Context context, String url) {
            // Open the URL with your own H5 container
        }
    });
}

For more customization, refer to the official Android guide.

Source Code

The project is open‑source on GitHub: https://github.com/didi/DoraemonKit

Project Activity

DoraemonKit is currently running a "Submit PR, Win Prizes" campaign, offering limited‑edition badges, open‑source T‑shirts, movie tickets, and notebooks to contributors. Details: Join the activity

iOSAndroidPerformance Monitoringmobile debuggingdevelopment toolkitDoraemonKit
Didi Tech
Written by

Didi Tech

Official Didi technology account

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.