
The problem was that the default port setting is 9000, which in my case I have that port already in use so I looked in my nginx conf at this line: location ~ \.
Php enable xdebug ampps mac pro#
I had trouble with setting up MAMP Pro and nginx myself and the above answer did not work for me.
Php enable xdebug ampps mac update#
If you already have cachegrind output files you should be able to select the file in the “Auto (newest)” dropdown or leave it select at Auto and click update which will reveal the profile data Visit webgrind url setup on your local MAMP installation. Setup Webgrind host on MAMP to run Webgrind Continue for steps on setting up with webgrind. Webgrind is a simple web based application that you can run locally on MAMP and it will look for the cachegrind.out files automatically with just one click. Some things to keep in mind: It is written for the official PHP docker image on Docker Hub (using the docker-php-ext-xdebug. To enable it again, the file is copied back. This instructs Xdebug to start writing profiling information into the directory configured with the. Please refer to Configure PHP in the documentation to find out which PHP ini file to modify. I went the simple route and used webgrind. Upon restart of the app container, PHP loads completely without xdebug. In your php.ini, 99-xdebug.ini, or other distribution specific PHP ini file, change (or set) the xdebug.mode setting to profile. Apps like KCacheGrind (Linux/Windows, KDE), WinCacheGrind (Windows), xdebugtoolkit, and Webgrind. Now you can use any app that understands those cachegrind.out files to view the profile data. You can open the ‘/tmp’ directory in finder by opening the terminal and running open /tmp Open your ‘/temp’ directory and run one of your PHP files to make sure it is working correctly. If you used the same settings that I have above, when you run PHP code, Xdebug will put the cachegrind.out files in your ‘/tmp’ directory. Doing a search in the browser window for “Xdebug” makes this easy. Check to make sure that Xdebug is running. Open MAMP’s WebStart page and navigate to PHPInfo tab. Do not forget to restart Apache to reflect the.

Click on Apply to change the configurations. Check the extensions to enable it or uncheck the extensions to disable it. Click on Extensions button (see the image). Save edited template and close edit window Click on Settings button in front of PHP (see the image). Now when you have errors, if they are sent to standard out, you will see something like this If you don’t want profile output and just want xdebug running then use DONT REMOVE: MAMP PRO php5.3.6.ini template compatibility version: 1 Zend_extension="/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so" Edit the template file via File -> Edit Template -> PHP -> PHP php.iniĮdit bottom of php.ini template file so that it ends up looking like if you want profile output

Here's the tutorial that helped me:Įdit php.ini template file through MAMP to enable the extension. Since release of MAMP 2.01 XDebug is already included.
