如果使用phpstudy則可以直接開啓
image.png
打開php.ini
xdebug.profiler_output_dir="E:\phpstudy\PHPTutorial\tmp\xdebug" xdebug.trace_output_dir="E:\phpstudy\PHPTutorial\tmp\xdebug" zend_extension="E:\phpstudy\PHPTutorial\php\php-5.6.27-nts\ext\php_xdebug.dll" xdebug.remote_enable =1 xdebug.remote_handler = "dbgp" xdebug.idekey = PHPSTORM xdebug.remote_host = "127.0.0.1" xdebug.remote_port = 9000 ;是否允許Xdebug跟蹤函數調用,跟蹤信息以文件形式存儲,默認值爲0 xdebug.auto_trace=1 ;是否允許Xdebug跟蹤函數參數,默認值爲0 xdebug.collect_params=1 ;是否允許Xdebug跟蹤函數返回值,默認值爲0 xdebug.collect_return=1 ;函數調用跟蹤信息輸出文件目錄,默認值爲/tmp xdebug.trace_output_dir ="D:\myworkVIP\phpstudy\tmp\xdebug" ;性能分析文件的存放位置,默認值爲/tmp xdebug.profiler_output_dir ="D:\myworkVIP\phpstudy\tmp\xdebug" ;打開xdebug的性能分析器,以文件形式存儲,這項配置是不能以ini_set()函數配置的,默認值爲0 xdebug.profiler_enable = 1
設置phpstorm
image.png
image.png
image.png
image.png
image.png