IntelliJ IDEA 14.0.3 Help

Analyzing Xdebug Profiling Data

When integration with Xdebug profiler is enabled, IntelliJ IDEA provides visual representation of profiler snapshots. IntelliJ IDEA opens a separate editor tab with four views where the data are presented based on different criteria.

To have the profiling data collected and analyze it, perform these general steps:

To initiate a debugging session, do one of the following

  • To start debugging an entire application, create debug configuration of the type PHP Web Application, and launch debugging by clicking the Debug toolbar button debug.

    See Debugging with a PHP Web Application Debug Configuration for details.

  • To debug a specific PHP HTTP request, define a debug configuration of the type PHP HTTP Request, and launch debugging by clicking the Debug toolbar button debug.

    See Debugging a PHP HTTP Request for details.

  • Enable control over the debugger from the browser.
  • Generate bookmarklets to toggle the debugger through.
  • Toggle the Start Listen PHP Debug Connections button start_listening_php_debug_connections.png so it changes to stop_listening_php_debug_connections.png. After that IntelliJ IDEA starts listening to the port of the debugging engine used in the current project. Ports for debuggers are set at the IntelliJ IDEA level in the Debug dialog box ( File | Settings | PHP | Debug ).
  • Open the starting page of your application in the browser.
  • To activate Xdebug from the browser, choose the XDebug Start Profiler bookmark.
  • Refresh the page.
  • Return to IntelliJ IDEA and continue the session.

To retrieve the collected profiling data

  1. On the main menu, choose Tools | Analyze Xdebug Profiler Snapshot .
  2. In the Select Xdebug profiler snapshot dialog box, that opens, choose the folder and the file where the profiling data is stored.

    IntelliJ IDEA presents the collected profiling data in a separate editor tab with the name of the selected profiler output file.

To view and examine the profiling data, perform these general steps

When you request on the accumulated profiling data, IntelliJ IDEA opens its visualized presentation in a separate editor tab. The tab is named after the selected profiler output file and consists of several views. Switch between the views to analyze the profiling data based on various criteria of analysis.

  • In the Execution Statistics view, examine the summary information about execution metrics of every called function.
  • In the Call Tree view, explore the execution paths of all called functions.
  • To explore the execution paths of a specific function, select the function in question in the Call Tree view and view its callees in the Callees view.
  • To explore all the paths that can result in calling a specific function, select the function in question in the Call Tree view and examine its possible callers in the Callers view.

See Also

Last modified: 3 February 2015
comments powered by Disqus