Created Obtain logs for debug (markdown)

Sam Lee 2019-10-12 12:22:41 -07:00
parent db34687b99
commit 8926777073

22
Obtain-logs-for-debug.md Normal file

@ -0,0 +1,22 @@
Prerequisites: Android SDK is installed on your computer. Specifically, `adb` is available.
On command line:
1. Find out the process ID (`PID`) of AntennaPod. e.g., using `ps` . It is 21638 in the following example
```shell
# In a terminal on your computer with Android SDK
$ adb shell
perry_f:/ $ ps | grep de.danoeh.antennapod
u0_a432 23771 681 992528 32408 SyS_epoll_ 00000000 S de.danoeh.antennapod
perry_f:/ $ exit
```
2. Use `adb logcat` to dump the output to a file, e.g.
```
$ adb logcat --pid=23771 -d > logcat.log
```
Notes:
- See [Logcat documentation](https://developer.android.com/studio/command-line/logcat) for tweaking the outputs. Some useful ones include:
- `-t '<time>'` : show logs only since the specified time (to reduce output)
- `-e <expr>` : filter output by regular expression
- sometimes you might all the logs. (no `--pid` argument), as some fatal error will cause Android runtime to indicate errors in the log (that might be helpful) that are out of AntennaPod's process.