Introduction Logcat is a tool in Eclipse's Android-developed toolkit ADT that is used to view and filter the output of the Android log system.
Open Logcat
Go to Eclipse, select the Window menu, then select the Show View submenu, then the Other submenu, select Logcat in the Android group in the Open Show View dialog box, double-click it, or click OK to open the Logcat panel.
Logcat does not display log after connecting to the real machine sometimes when Eclipse is turned on, the real Android device is connected to the computer via a USB cable and no log input is seen in the Logcat.
This may be due to the fact that other phone utilities are installed on the computer, which takes up the ports required to run the ADB (Android Debug Bridge) service, resulting in the inability to connect to the Android device via ADB, resulting in no log output.
You can use the following steps to resolve the problem:
1. Close Eclipse;
2. Open the operating system command line tool, use the CD command to switch to the Android SDK Bin directory, enter the ADB Nodaemon server, to see whether the interface used by the ADB service is occupied, if occupied, the given hint will show the occupied port, usually 5037;
3. Continue to enter commands in the command line tool Netstat-ano | Findstr 5037, view the process information that occupies the port, assuming that the process number that occupies the port is xxx;
4. Continue to enter commands in the command line tool taskkill/f/pid XXX, kill the process;
5. Restart Eclipse.
Note Android Debug Bridge (ADB) is a client-server application that can be used to connect to any Android device (real device or virtual machine).
Use of Android development Logcat in Eclipse