Catdea Plugin
Catdea Plugin intended to match Android Logcat log entries with the source code that emit them, thereby providing navigation and interactivity, in order to simplify debugging or reverse engineering.
Plugin uses pre-compile-time calculations to identify log emitters in the source code, thus, no RegExp patterns required.
Installation
Install from JetBrains Plugins Repository or get from latest release and choose it in IDE (File
→ Settings
→ Plugins
→ Install Plugin from Disk
).
Features
-
Logcat Monitor Tool Window
In this tool window, you can view and analyze Logcat output with syntax highlighting and navigation to the source code.
-
Navigation
Provides navigation from log entry to the source code that emit it, and vice versa.
Click Navigate
→ Declaration
menu on log entry to go to the emitter. Click Navigate
→ Related symbol...
menu on the call in source code, or click gutter icon to go to the log entry.
-
Folding
Collapse and expand log entry's package name or tag. Use Code
→ Folding
menu or shortcuts.
-
Highlighting
Highlight log entries with the same tag and log entries, that do not match to the code
-
Log files support
Save Logcat output to file with extensions .log
, .logcat
or .logdump
for later analysis in offline mode.
-
Flexible log format
Only log level, tag and message are required to provide navigation.
-
Syntax highlighting and colors settings
Tune your color preferences (File
→ Settings
→ Editor
→ Color Scheme
→ Catdea
).
-
Log wrappers support
Custom classes that wraps Android Log functionality will be recognized as log emitters automatically.
Consider the following class SecLog
, which is a wrapper on the android.util.Log
:
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
public final class SecLog {
public static final String TAG = "["+ SecLog.class.getSimpleName() + "]";
public static void i(@NonNull String tag, @Nullable String msg) {
if (msg != null) {
Log.i(TAG, tag + ": " + msg);
}
}
}
Then call of SecLog.i
method like this:
SecLog.i(TAG, "onSignup() called with: isSuccess = [" + isSuccess + "]");
will be recognized as log emitter.
Gutter icon will appear and provide navigation to the log entry. If emitter is identified, but there are no log entries matched it - icon will be shown.
-
Format strings support
Catdea is able to identify log emitter that uses String.format
and others.
Log.d(TAG, String.format("generatePassword(%d) = \"%s\"", length, password));
-
(Un)comment log entry
Use Code
→ Comment with Line Comment
menu or shortcut on the log entry.
-
Logs View in Project-View
Logs view groups all Logcat dump files into one place for better management.
Changelog
- 1.1 Android Logcat Monitor Tool Window
- 1.0 Initial release