Home >Backend Development >PHP Tutorial >Hbuilder configures php breakpoint debugging
This article mainly introduces the Hbuilder configuration PHP breakpoint debugging, which has certain reference value. Now I share it with everyone. Friends in need can refer to it.
First go to the xdebug official website to download and your PHP The xdebug extension has the same version. Mine is php-5.4.29-Win32-VC9-x86, so what I downloaded is php_xdebug-2.4.0rc3-5.4-vc9.dll
Put php_xdebug-2.4.0rc3-5.4-vc9. dll is copied to the php directory, I copied it to H:\phpStudy\php\php_xdebug-2.4.0rc3-5.4-vc9.dll (using phpstudy integrated environment)
Modify the php.ini configuration as follows, I closed it Partially save the configuration of the analysis file, which will have less impact on the website speed. .
[Xdebug];你的xdebug文件路径,不要有空格和中文名之类的就不用再多说了。。zend_extension=H:/phpStudy/php/php_xdebug-2.4.0rc3-5.4-vc9.dll;开启自动跟踪xdebug.auto_trace = Off;开启异常跟踪xdebug.show_exception_trace = Off;开启远程调试自动启动xdebug.remote_autostart = On;开启远程调试xdebug.remote_enable = On;收集变量xdebug.collect_vars = Off;收集返回值xdebug.collect_return = Off;收集参数xdebug.collect_params = Off xdebug.trace_output_dir="H:/phpStudy/php/Projecs"xdebug.profiler_enable=Off xdebug.profiler_output_dir="H:/phpStudy/php/Projecs"xdebug.remote_host=localhost xdebug.remote_port=9000xdebug.remote_handler=dbgp
Modify Hbuilder configuration.
Just change the port number to the one configured in php.ini, then add a breakpoint to the php file, access the browser, and see if it stops. . . .
One thing that needs to be added is that the maximum execution time of PHP under Windows seems to be 30 seconds, which may affect debugging. Mine has been changed to max_execution_time=6000
which is a full 100 minutes. . If you encounter problems, you can make this larger. .
When entering the breakpoint, there will be a prompt: breakpoint at first line. If you choose yes, the breakpoint will be entered from the first line by default. You can choose no, or you can set it yourself
This will start from the breakpoint. . .
The above is the detailed content of Hbuilder configures php breakpoint debugging. For more information, please follow other related articles on the PHP Chinese website!