Reputation: 789
Been diving into writing android modules for react but i am having a hard time debugging my native android code...
i can debug the react-native JS without and issue...
Any ideas????
Upvotes: 3
Views: 1827
Reputation: 2715
Use the Android logger. For example:
import android.util.Log;
// later
Log.e("MyComponent", "Message to log");
Then use logcat to watch for the messages you set:
adb logcat *:S MyComponent:V
Or to see your messages alongside all the other React errors and warnings:
adb logcat *:S ReactNative:V ReactNativeJS:V MyComponent:V
Upvotes: 10