IntelliJ IDEA 13.1.0 Web Help

11.0+

View | Tool Windows | Android

In this tool window, view and analyze the system debug output when debugging Android applications. The tool window consists of two tabs:

Devices / Logcat Tab

The tab consists of three areas:

  • Devices pane
  • Logcat pane
  • Toolbar

Devices

In this pane, appoint the virtual emulator or the physical device where the application to debug is executed. The Devices drop-down list shows all the currently running devices. After that the area shows a list of all the processes on the selected device.

Logcat

The pane shows the log of all the processes that are currently running on the device appointed in the Devices pane. To have the pane show only the messages corresponding to a specific process, select the process of interest in the Devices pane and then press the Only show logcat for selected process toggle button android_logcat_show_only_selected_process_messages on the toolbar.

Toolbar

Use the toolbar buttons to configure the range and presentation of the log data in the pane and to navigate through the log.

Item Tooltip and shortcut Description
android_logcat_show_only_selected_process_messages Only show logcat for selected process
  • Press this toggle button to have the Logcat pane show only the messages that refer to the process selected in the Devices pane.
  • Release this toggle button to have the Logcat pane show all the messages that are running on the virtual or physical device chosen in the Devices pane.
Log Level In this drop-down list, specify the priority of messages to display. This improves the visibility of information in the tool window. The available options are:
  • Verbose
  • Debug
  • Info
  • Warn
  • Error
  • Assert
find1.gif Find Use this text box to search through the list of messages according to entire messages or parts of them. As you type a search string, the messages that match the search pattern are displayed, with the matching character strings highlighted. To finalize the search, press EnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnter. The previously used search patterns are stored in the search history list.
Filters In this area, configure a list of filter configurations and appoint the relevant one to apply.

A filter configuration is a set of filtering parameters. Applying filter configurations provides more flexible control over the type and amount of information displayed that just specifying the information type by choosing a message priority in the Log level drop-down list.

  • To have a filter applied, choose it from the Filter drop-down list.
  • To have all the log information displayed, choose No Filters from the drop-down list.
  • To create a new filter configuration, choose Edit Filter Configuration. In the Create New Logcat Filter dialog box that opens, click the Add toolbar button add.png and specify the filtering parameters based on various factors:
    • Log Tag: use this parameter to have only messages from a certain component displayed. Type the regular expression to specify the tag that indicates the relevant system component, such as activity, activity, etc.. For more details, see Filtering Log Output.
    • Log Message: use this parameter to have only messages that contain certain elements or character strings displayed. Type the regular expression the defines specify the character string to detect.
    • Package Name:use this parameter to have only messages that refer to a specific Java package (class path) displayed.
    • PID: use this parameter to have oly messages that refer to a specific process (process ID) displayed.
    • Log Level: use this parameter to have only messages with a certain priority displayed, see Filtering Log Output for details.

    To update a filter, select it in the list and change the filtering parameters.

  • To remove a filter configuration from the list, choose Edit Filter Configuration. In the Create New Logcat Filter dialog box that opens, select the filter and click the Delete toolbar button delete.png.
clear.png Click this button to clear the search history list.
Clear log Click this button to have the data from previous sessions removed from the log file of the device.
arrowUp Up the Stack Trace
Ctrl+Alt+Up
Click this button to navigate up in the stack trace and have the cursor jump to the corresponding location in the source code.
arrowDown Down the Stack Trace
Ctrl+Alt+Down
Click this button to navigate down in the stack trace and have the cursor jump to the corresponding location in the source code.
icon_softWrap Use Soft Wraps Click this button to toggle the soft wrap mode of the output.
icon_end_of_output.png Scroll to the end If this button is pressed, the caret is always kept at the last line of the console output.
print Print Click this button to have the logs printed.
clear_all Clear All Click this button to have all the messages removed from the console.
rerunConsole.png Restart Click this button to restart logging.

ADB logs

This tab shows the Android Debugging Bridge log messages.

Toolbar

The toolbar is common for the Devices / Logcat and ADB tabs.

Item Tooltip and shortcut Description
android_logcat_screen_capture Screen Capture Click this button to capture the image of the application output on the screen of the emulator or physical device. The captured image is displayed in a dialog box where you can save it, if necessary.
android_logcat_screen_record Screen Record Click this button to start recording the application output on the screen of the emulator or physical device.
android_logcat_system_information System Information Click this button to view information on the selected process provided by the Dumpsys. The logs are presented as text files and are shown in separate editor tabs. Choose the information type to view from the pop-up menu that opens:
  • Activity Manager state
  • Package Information
  • Memory Usage
  • Memory use over time
  • Graphics State
closeRedCircle Terminate Application Click this button to cancel the execution of the application.
android_logcat_initiate_GC Initiate GC Click this button to start garbage collection, whereupon you can examine the amount of heap memory the selected process uses, see Viewing heap usage. The button is available only when you have selected a process in the Devices pane.
android_logcat_start_method_tracing Start Method Tracing Click this button to invoke profiling of a method, see Starting method profiling. The button is available only when you have selected a process in the Devices pane.

See Also

Procedures:

Reference:

Getting Started:

Web Resources: