Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configure xampp and Xdebug under Mac

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

1. Install phpStorm with brief steps

two。 Install xampp:

2.1The version I downloaded is: XAMPP 5.6.24 (there is no xdebug.so file in the latest download)

Follow the steps to install.

2.2 after the installation is successful, launch to see if it can be run, and type localhost in the browser address bar to see if you can access the xampp website.

2.3 Click the phpinfo option in the upper right corner of the website to go to the phpinfo configuration page, and in the first table, find load … At the beginning, copy the path, open it, and enter it at the bottom:

[xdebug]

Zend_extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so

Xdebug.remote_autostart=on

Xdebug.remote_enable=on

Xdebug.remote_enable=1

Xdebug.remote_mode= "req"

Xdebug.remote_log= "/ var/log/xdebug.log"

Xdebug.remote_host=localhost/127.0.0.1

Xdebug.remote_port=9010

Xdebug.remote_handler= "dbgp"

Xdebug.idekey= "PhpStorm"

Restart apach and check again if there is a xdebug item in phpinfo.

3. Configure phpstorm

3.1 Open the project (the project already has read and write permissions), click phpstorm-preferences, enter Languages&Frameworks, and click the PHP option

Configuration of interpreter:

3.2 PHP-Debug configuration: the port is the same as in the phpinfo file: xdebug.remote_port=9010

3.3 Debug-DBGp Proxy:

IDE key:PhpStorm

Host: if the domain name is configured, write the domain name here, otherwise you can write localhost.

Port: write anything (80 or 9001 is fine)

3.4 PHP-Servers:

Name: arbitrary write

Host: if the domain name is configured, write the domain name here, otherwise you can write localhost.

3.5 Click in the upper right corner of php

Click the + sign to add PHP Web Application

Server: the Server you just established

Start URl: write the address where the project can be accessed by adding the Server path

You can click the link below to see if you can access the project.

3.6 add point, click the "phone" icon to make it green, click the debug (bug) button to enter debug mode

3.7Click fn+f8 to move the breakpoint

Note: when the sql of xampp cannot be started, it can be started manually:

Sudo / Applications/XAMPP/xamppfiles/bin/mysql.server start

For more information on Xampp multi-domain configuration, please see http://www.cnblogs.com/heiniu/archive/2011/10/14/2212478.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report