文章目錄
- 一、php.ini配置
- 二、IDEA配置
一、php.ini配置
[xdebug]
zend_extension="F:\wamp64\bin\php\php7.4.0\ext\php_xdebug-2.8.0-7.4-vc15-x86_64.dll"
xdebug.remote_enable = on
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9001
xdebug.idekey="panda"
xdebug.remote_handler = dbgp
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="F:\wamp64\tmp"
xdebug.show_local_vars=0
其中php_xdebug-2.8.0-7.4-vc15-x86_64.dll
這個是wamp
軟件自帶的。無需自己單獨下載
重啟apache,查看phpinfo信息。
二、IDEA配置
1、File | Settings | Languages & Frameworks | PHP
下圖的PHP環境選擇步驟一中,使用配置的PHP,xdebug路徑也要對應上。
2、File | Settings | Languages & Frameworks | PHP | Debug
端口和php.ini中配置的對應上。
3、File | Settings | Languages & Frameworks | PHP | Debug | DBGp Proxy
4、File | Settings | Languages & Frameworks | PHP | Servers
5、PHP Web Page