adb view mobile application log

        Turn on the developer mode of the mobile phone, click the mobile phone version in the settings several times, until "You are already in the developer mode, no need to perform this operation" appears, and then connect the mobile phone to the computer with a data cable, and a data cable that can transfer files must be used . Select Transfer Files.

        On the computer with adb installed, open the command line mode.

adb devices

        View connected devices. The picture below shows that there is a device. If there is no connection, there will be no last line.

 

adb.exe shell

        Enter the device.

         

        Open the app on your phone to view the logs. Execute afterwards.

ps -ef | grep appName

        Look up by the name of the app. Check the process number.

       Use the process number to view the log.

logcat | grep 进程号

Guess you like

Origin blog.csdn.net/h360583690/article/details/131154410