How to install Xdebug,webgrind under Mamp?

Source: Internet
Author: User
Tags phpinfo tmp file zts

Scene

Os:mac OSX 10.10

Environment: MAMP PRO 3.03

php:5.5.10

Webgrind 1.1


Target:

1. Installing the Xdebug module for PHP

2. To view the data generated by the Xdebug, install Webgrind (a Web page that invokes the data).

3.webgrind role: Webgrind is a web-based performance analysis tool, its main role is to analyze the xdebug generated cachegrind files, in a user-friendly and detailed way to display performance data


Think:

1. Installing the Xdebug physical module into PHP

2. Configure xdebug,[in PHP to make the physical module action, equivalent to the driver.

3. Call the Xdebug captured file. [implemented by installing Webgrind]


Step

1.MAMP comes with xdebug.so module, no download required. [File path:/applications/mamp/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so]

Check: Manually find the corresponding file.

2. Configure Xdebug.

With Mamp PRO selected, select File>>edit template>>php>>php5.5.10.ini in the menu bar

Add two lines of code in the last [Xdebug]: (path modified as needed)

[xdebug]zend_extension= "/applications/mamp/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212/ xdebug.so "xdebug.profiler_enable = 1xdebug.profiler_output_dir ="/tmp "
Detection: Open Mamppro Web version view Phpinfo[http://localhost/mamp/index.php?language=english&page=phpinfo]

The Xdebug module shows that the first two steps are correct.


3. Execute the PHP file on the Web page, and then view the/tmp file in the folder to see if there are any files [cachegrind.out.xxx] generated. There is a description xdebug normal operation. Next, it's about how to read these files.

Command+shift+g open "Go to Folder", Output/TMP [This path is consistent with the configuration path in Step2]


4. Read Xdebug production file [cachegrind.out.xxx] There are many ways to write this article webgrind.

Webgrind principle: is a normal page [has collection function]. Can be directly to the website root directory [location with personal preferences]

Implementation steps: Download >> deployment >> use

:Https://github.com/jokkedk/webgrind

Use: Refer to Reference Document 2


Reference documents

1:how to run Xdebug on Mac OSX using MAMP

2:webgrind installation using detailed instructions


How to install Xdebug,webgrind under Mamp?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.