IntelliJ IDEA 2016.2 Help

Android Monitor Tool Window

View | Tool Windows | Android Monitor


In this tool window, you can view and analyze the system debug output when running or debugging Android applications.

The tool window consists of a toolbar and the following nested tabs:

Select a physical or a virtual device from the devices drop-down list, and a process running on the selected device from the processes drop-down list. The information in each tab is filtered in accordance with your selection.

Toolbar

The toolbar that is common for both nested tabs, provides quick access to the following actions:

IconTooltipDescription
android_logcat_screen_capture Screen Capture Click this button to make a screenshot of the virtual or the connected physical device where the application is running. You can rotate the screenshot and add some visual effects in the dialog that opens, and save the capture.
android_logcat_screen_record Screen Record Click this button to start video recording of the application output on a physical device. This button only becomes available when you connect a physical Android device to your computer.
ij_android_system_information System Information Click this button to view system information on the selected process provided by the Dumpsys tool. Logs open as text files in separate editor tabs. Select which type of information you want to view from the popup menu that opens:
  • Activity Manager State: select this option to display system output of the Activity Manager - a component responsible for managing a stack of the application's activities.
  • Package Information: select this option to display system information on the application package.
  • Memory Usage: select this option to display detailed information on the application memory usage in kB.
  • Memory use over time: select this option to display detailed information on the system memory usage aggregated in the last 24 hours and the last 3 hours, and the current memory usage statistics.
  • Graphics State: select this option to display detailed application's graphics acceleration info.
ij_android_teminate_application Terminate Application Click this icon to stop the application execution.
help Android Monitor Help Click this icon to open the Android Monitor help page.

Logcat tab

This tab shows all system debug output messages related to the selected process on the selected device.

Toolbar

Use the toolbar controls and buttons to configure the scope and the presentation of log data, and to navigate through the log.

ItemTooltip and shortcutDescription
Log Level N/A From this drop-down list, select the priority of log messages to be displayed. The available options are:
  • Verbose
  • Debug
  • Info
  • Warn
  • Error
  • Assert
find1.gif FindUse this text box to search through the list of messages. 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 Enter. Search patterns are stored in the search history list. To clear the search history, click the clear button.
Regex N/A Select this option if you want to use a regular expression search pattern.
FiltersN/A From this list, select an existing filter configuration, or create a new one.

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

  • To display messages related to the selected process, select Show only selected application.
  • If you want full log data to be displayed, select No Filters from the drop-down list.
  • To apply a filter, select it from the drop-down list.
  • To create a new filter configuration, select Edit Filter Configuration. In the Create New Logcat Filter dialog box that opens, click the Add toolbar button add.png and specify the following filtering parameters:
    • Log Tag: use this parameter if you only want messages from a certain system component to be displayed. Type a regular expression to specify the tag that indicates the relevant system component, such as ActivityManager, AudioService, etc., or a user-defined tag. For more details, see Filtering Log Output.
    • Log Message: use this parameter if you only want messages that contain certain elements or character strings to be displayed. Type a regular expression that defines the character string to be detected.
    • Package Name: use this parameter if you only want messages that refer to a specific Java package (class path) to be displayed.
    • PID: use this parameter if you only want messages that refer to a specific process (process ID) to be displayed.
    • Log Level: use this parameter if you only want messages with a certain priority level to be displayed.
  • To update a filter, select Edit Filter Configuration, then in the Create New Logcat Filter dialog that opens select a filter from the list and edit the filter values.

  • 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_all Clear logcat Click this button to remove log data from previous sessions on the selected device.
icon_end_of_output.png Scroll to the end Click this button to move the caret to the last line of the console output.
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.
print Print Click this button to print the logs.
rerunConsole.png Restart Click this button to restart logging.
gear_icon Logcat Header Click this icon to configure the Logcat header. You can select the followng options in the dialog that opens:
  • Show date and time
  • Show process and thread IDs (PID_TID)
  • Show package name
  • Show tag
help Logcat Help Click this icon to open the Logcat help page.

Monitors tab

The Monitors tab displays different Android performance monitors.

Memory Monitor

The Memory monitor shows in real-time how your application allocates memory. It displays available and used memory in a graph, which is good for testing purposes and helps detect whether performance issues are related to garbage collection events:

android_memory_monitor

Memory Monitor Toolbar

ItemTooltipDescription
android_enable_monitor Enabled/Disabled Click this icon to enable/disable the Android memory monitor.
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).
dumpJavaHeap Dump Java Heap Click this button to dump the contents of the Java heap memory to a file.
ij_android_allocation_tracking Start Allocation Tracking Click this button to start recording your application's memory allocations. Then interact with your application and click the same button to stop allocation tracking. A pane with the recorded data will open as a separate editor tab.

Allocation tracking is helpful to identify where similar object types are allocated and deallocated over a short period of time, and to detect places in your code that may cause inefficient memory usage.

help Help Click this icon to open the Memory Monitor help page.
arrowUp Move Memory Monitor Up Click this icon to move the Memory Monitor pane up.
arrowDown Move Memory Monitor Down Click this icon to move the Memory Monitor pane down.
android_minimize_monitor
android_maximize_monitor
Minimize/Maximize Memory Monitor Click this icon to minimize/maximize the Memory Monitor pane.

CPU Monitor

The CPU monitor shows in real time how much CPU is being used in a graph:

android_CPU_monitor

CPU Monitor Toolbar

ItemTooltipDescription
android_enable_monitor Enabled/Disabled Click this icon to enable/disable the CPU monitor.
android_logcat_start_method_tracing Start Method Tracing Click this button to invoke profiling of a method, see Starting method profiling. Interact with the application, and then click the same button to stop method tracing. A pane with the recorded data will open as a separate editor tab.

Method tracking is useful to track down performance issues.

help Help Click this icon to open the CPU Monitor help page.
arrowUp Move CPU Monitor Up Click this icon to move the CPU Monitor pane up.
arrowDown Move CPU Monitor Down Click this icon to move the CPU Monitor pane down.
android_minimize_monitor
android_maximize_monitor
Minimize/Maximize CPU Monitor Click this icon to minimize/maximize the CPU Monitor pane.

Network Monitor

The Network monitor enables you to track your application network requests:

android_network_monitor

The Network Monitor is only available if you are running your application on a physical device, as it does not monitor emulators.

Network Monitor Toolbar

ItemTooltipDescription
android_enable_monitor Enabled/Disabled Click this icon to enable/disable the Network Monitor.
help Help Click this icon to open the Network Monitor help page.
arrowUp Move Network Monitor Up Click this icon to move the Network Monitor pane up.
arrowDown Move Network Monitor Down Click this icon to move the Network Monitor pane down.
android_minimize_monitor
android_maximize_monitor
Minimize/Maximize Network Monitor Click this icon to minimize/maximize the Network Monitor pane.

GPU Monitor

The GPU monitor displays how much time it takes to render the frames of a UI window:

android_GPU_monitor

Note that to use the GPU Monitor, you need to install the GPU Debugging Tools through the SDK Manager (for detailed instructions, see GPU Debugger).

GPU Monitor Toolbar

ItemTooltipDescription
android_enable_monitor Enabled/Disabled Click this icon to enable/disable the GPU Monitor.
help Help Click this icon to open the GPU Monitor help page.
arrowUp Move GPU Monitor Up Click this icon to move the GPU Monitor pane up.
arrowDown Move GPU Monitor Down Click this icon to move the GPU Monitor pane down.
android_minimize_monitor
android_maximize_monitor
Minimize/Maximize GPU Monitor Click this icon to minimize/maximize the GPU Monitor pane.

See Also

Getting Started:

Last modified: 23 November 2016