All Projects β†’ zerobranch β†’ Android Remote Debugger

zerobranch / Android Remote Debugger

Licence: apache-2.0
A library for remote logging, database debugging, shared preferences and network requests

Projects that are alternatives of or similar to Android Remote Debugger

Cocoadebug
iOS Debugging Tool πŸš€
Stars: ✭ 3,769 (+2755.3%)
Mutual labels:  network, logging, logger, debugging, debug
React Native Logs
Performance-aware simple logger for React-Native with namespaces, custom levels and custom transports (colored console, file writing, etc.)
Stars: ✭ 84 (-36.36%)
Mutual labels:  logging, logger, debugging, debug
Android Debug Database
A library for debugging android databases and shared preferences - Make Debugging Great Again
Stars: ✭ 7,946 (+5919.7%)
Mutual labels:  database, debugging, debug, sharedpreferences
Debug
A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. Works in Node.js and web browsers
Stars: ✭ 9,912 (+7409.09%)
Mutual labels:  logging, debugging, debug
Vlog
An in-display logging library for Android πŸ“²
Stars: ✭ 86 (-34.85%)
Mutual labels:  logging, debugging, debug
Acho
The Hackable Log
Stars: ✭ 189 (+43.18%)
Mutual labels:  logging, logger, debug
Dotzu
πŸ“±πŸ‘€ In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More.
Stars: ✭ 1,802 (+1265.15%)
Mutual labels:  network, logging, logger
Timber Elixir
🌲 Great Elixir logging made easy
Stars: ✭ 226 (+71.21%)
Mutual labels:  logging, logger, debugging
Logcat
Android ζ—₯εΏ—ζ‰“ε°ζ‘†ζžΆοΌŒεœ¨ζ‰‹ζœΊδΈŠε―δ»₯η›΄ζŽ₯ηœ‹εˆ° Logcat ζ—₯志啦
Stars: ✭ 189 (+43.18%)
Mutual labels:  logging, logger, debug
PowerPreference
πŸ’Ύ A Powerful library to control and simplify the usage of shared preference in Android.
Stars: ✭ 95 (-28.03%)
Mutual labels:  debugging, sharedpreferences, debug
android-sdk
AppSpector is a debugging service for mobile apps
Stars: ✭ 39 (-70.45%)
Mutual labels:  logger, remote, debug
Wormholy
iOS network debugging, like a wizard πŸ§™β€β™‚οΈ
Stars: ✭ 2,010 (+1422.73%)
Mutual labels:  network, logging, logger
Xcglogger
A debug log framework for use in Swift projects. Allows you to log details to the console (and optionally a file), just like you would have with NSLog() or print(), but with additional information, such as the date, function name, filename and line number.
Stars: ✭ 3,710 (+2710.61%)
Mutual labels:  logging, debugging, debug
Ios Sdk
AppSpector is a debugging service for mobile apps
Stars: ✭ 56 (-57.58%)
Mutual labels:  logging, logger, debug
Laravel Log To Db
Custom Laravel and Lumen 5.6+ Log channel handler that can store log events to SQL or MongoDB databases. Uses Laravel/Monolog native logging functionality.
Stars: ✭ 76 (-42.42%)
Mutual labels:  database, logging
Diary
πŸ“‘ Zero-dependency, fast logging library for both Node and Browser.
Stars: ✭ 79 (-40.15%)
Mutual labels:  logging, debug
Loguru
Python logging made (stupidly) simple
Stars: ✭ 10,510 (+7862.12%)
Mutual labels:  logging, logger
Logsip
A simple, concise, colorful logger for Go
Stars: ✭ 94 (-28.79%)
Mutual labels:  logging, logger
Scala Trace Debug
Macro based print debugging. Locates log statements in your IDE.
Stars: ✭ 110 (-16.67%)
Mutual labels:  debugging, debug
Reddit Detective
Play detective on Reddit: Discover political disinformation campaigns, secret influencers and more
Stars: ✭ 129 (-2.27%)
Mutual labels:  database, network

Android Remote Debugger

API License Android Arsenal

Android Remote Debugger is a library for remote debugging Android applications. It allows you to view logs, databases, shared preferences and network requests directly in the browser.

Choose language

English

Русский

Features

  • Logging
    • View the logs of your application
    • Filter logs by priority and tags
    • Search logs
    • Download logs
    • Crash errors are also logged
  • Database
    • View all databases
    • Edit database entries
    • Delete database entries
    • Search data
    • Run custom sql query to get, add, update or delete data
  • SharedPreferences
    • View all data
    • Edit, add and delete data
    • Search data
  • Network
    • View all network requests and responses in a convenient format
    • Filter data by response code and errors
    • Download logs
    • Search data

Integration

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Add the following dependency to your module's build.gradle:

dependencies {
    debugImplementation 'com.github.zerobranch.android-remote-debugger:debugger:1.1.0'
    releaseImplementation 'com.github.zerobranch.android-remote-debugger:noop:1.1.0'
}

Note: The final line above will use a no-op version, which does nothing. It should only be used in production build. This makes it impossible to run the server on a production build.

How to use ?

Android Remote Debugger has 4 sections:

  • Logging
  • Database
  • Shared Preferences
  • Network

For the Logging, Database and Shared Preferences sections to work, several steps are necessary:

  1. Call: AndroidRemoteDebugger.init(applicationContext) in the application code.

  2. After launching your application, you will receive a notification in the notification panel, in which a link of the type: http://xxx.xxx.x.xxx:8080 will be indicated. Just follow this link in your browser. Also, an entry will be added to logcat: D/AndroidRemoteDebugger: Android Remote Debugger is started. Go to: http://xxx.xxx.x.xxx:8080

  3. To view the logs in the Logging section, you must call the static methods AndroidRemoteDebugger.Log anywhere in your application, for example, AndroidRemoteDebugger.Log.d("tag", "message") or AndroidRemoteDebugger.Log.log(priority, tag, msg, throwable) with all parameters specified.

  4. To view network logs in the Network section, it is necessary to use the OkHttp3 library and add the NetLoggingInterceptor interceptor. Recommended to add it after all others interceptors to get actual network traffic data.

OkHttpClient client = new OkHttpClient.Builder()
    .addInterceptor(new NetLoggingInterceptor())
    .build();

Attention

  • Your Android device and computer must be connected to the same network (Wi-Fi or LAN).
  • You can also use debugging via usb or Android Default Emulator. To do this, run the command: adb forward tcp:8080 tcp:8080 and go to the address: http://localhost:8080 or http://0.0.0.0:8080 in your browser.
  • If you use Android Default Emulator, then you may also need to turn on the mobile Internet and turn off WI-FI.

Screenshots

Logging

logging.png

Database

database_1.png database_2.png

Network

network_1.png network_2.png network_3.png

Shared Preferences

shared_preferences.png

Additional settings

To configure the library, use AndroidRemoteDebugger.Builder

AndroidRemoteDebugger.init(
    new AndroidRemoteDebugger.Builder(applicationContext)
        .enabled(boolean)
        .disableInternalLogging()
        .enableDuplicateLogging()
        .disableJsonPrettyPrint()
        .disableNotifications()
        .excludeUncaughtException()
        .port(int)
        .build()
);

Description of AndroidRemoteDebugger.Builder parameters

All parameters for AndroidRemoteDebugger.Builder are optional. For standard library operation, just call AndroidRemoteDebugger.init(applicationContext).

.enabled(boolean) - library enable control
.disableInternalLogging() - disable internal logs of Android Remote Debugger
.disableJsonPrettyPrint() - disable pretty print json in `Logging` and` Network` sections
.disableNotifications() - disable Android Remote Debugger status notifications
.excludeUncaughtException() - exclude log printing when application crashes
.port(int) - use a different port than 8080
.enableDuplicateLogging() - all logs from `Logging` section will also be printed in logcat
.enableDuplicateLogging(new Logger() { - callback to get all logs from `Logging` section
    @Override
    public void log(int priority, String tag, String msg, Throwable th) {
    }
})

The NetLoggingInterceptor interceptor has two constructors: empty and with a callback to get all logs from Network section

new NetLoggingInterceptor(new NetLoggingInterceptor.HttpLogger() {
    @Override
    public void log(HttpLogModel httpLogModel) {
    }
})

Description of Logging page parameters

logging_2.png
  1. Choosing a logging level
  2. Filter the logs by tag
  3. Enable/disable autoscroll when receiving new logs
  4. Go to the top of the list
  5. Go to the end of the list
  6. Enable/disable colors for logs
  7. Delete all logs

Note

  • A link to the debugger page can also be obtained as follows: http://ip-address-of-your-android-device:port (you can see the ip-address-of-your-android-device in the settings of your device).
  • If you use debugging via usb or Android Default Emulator and you want to use a different port, for example, 8081, then you need to run the following command: adb forward tcp:8081 tcp:8081.
  • To use this library on one Android device for two applications simultaneously, you need to use different ports.

R8 / ProGuard

If you use R8, you don't have to do anything. The specific rules are included automatically.

If you don't use R8 you have to apply the following rules:

-keep class zerobranch.androidremotedebugger.source.models.** { *; }
-keep class zerobranch.androidremotedebugger.source.local.LogLevel

You might also need rules from OkHttp3 and Gson, which are dependencies of this library.

License

Copyright 2020 Arman Sargsyan

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].