Five minutes to get Mac under phpStorm xdebug debugging, php breakpoint debugging

First install MAMP PRO, it comes with xdebug, you do not have to install a separate xdebug.

First, in the main window MAMP PRO:

1. Click Hosts, set the root directory, Document root for the specified directory.

2. Click PHP, select Xdebug (Debugger). 

Second, phpstorm - Debug in the Debug port>> Preference -> Languages ​​& Frameworks - -> PHP: 9000, three other selected check mark (do not change the default)

Third, phpstorm - Add Server Servers in>> Preference -> Languages ​​& Frameworks - -> PHP:

Name:localhost      

Host :localhost    

Port: 8888 (Apache consistent with)   

Debugger:Xdebug

Fourth, in phpstorm toolbar, click the arrow, Edit Configuration

Adding PHP Web Page (PHP Web Application)

Name: a name

Server:localhost    

Start URL:/

Browser: Select the browser

Pay attention not to change the php.ini content.

If you want to see the php.ini, the MAMP PRO -> File -> Edit Template -> PHP (php.ini) -> select the appropriate version

 

Not in the browser, plug-in installation bugs that chrom browser without having to install Xdebug extension
if not hit a breakpoint, click on the "red square button to the left", start listening for PHP debug connections

 

Six, Postman debugging API interface to download Postmen extension https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop/related

postman icon will appear automatically after installation, click the toolbar to open the Interceptor interceptor, will hit the breakpoint

 

Original link: https://www.jianshu.com/p/e22984f294f3

Published 18 original articles · won praise 10 · views 50000 +

Guess you like

Origin blog.csdn.net/a350110085/article/details/87992916