Debugging with Logcat
In IntelliJ IDEA, debugging of Android applications is provided through the support of the logcat functionality that stores a log of system debug output. Log messages include a stack trace when the emulator throws an error, so you can navigate to the exception location in the source code.
The logcat functionality is handled by the Android Debug Bridge (adb). This service supports interaction between your development environment, Android devices, emulators and other tools, for example, DDMS.
If various tools that use ADB are launched simultaneously, they may conflict with each other, so it is recommended to disable the logcat functionality before switching from IntelliJ IDEA to an ADB-managed tool.
In IntelliJ IDEA, the logcat functionality is available through the Logcat tab of the Android tool window. By default, the tab is activated automatically every time an application is deployed and launched successfully.
On this page:
Switching the logcat functionality on and off
Showing and hiding the Logcat tab
- Start creating an Android run/debug configuration or open an existing configuration for editing (in the main menu, navigate to Run | Edit Configurations and select the required configuration).
- Switch to the Logcat tab and clear the Show logcat automatically check box.