Type: boolean, Default value: 0
This switch controls whether Xdebug should try to contact a debug client which is listening on the host and port as set with the settings xdebug.remote_host and xdebug.remote_port. If a connection can not be established the script will just continue as if this setting was 0.
此開關控制著Xdebug是否應該嘗試聯系debug客戶端,這個客戶端正在監聽配置好的host和port. 如果這項配置為0,則當無法連接時,腳本會啥都不做,繼續執行。
④ xdebug.remote_autostart=1
Type:boolean, Default value:0
Normally you need to use a specific HTTP GET/POST variable to start remote debugging (seeRemote Debugging). When this setting is set to 1, Xdebug will always attempt to start a remote debugging session and try to connect to a client, even if the GET/POST/COOKIE variable was not present.
通常你需要使用一個特定的HTTP GET/POST 變量來啟動遠程bugging. 當此配置為1時, Xdebug將永遠會試圖遠程debugging session,并嘗試連接一個客戶端,即便 GET/POST/COOKIE變量沒有出現。
3, 重啟php服務
sudo service php5.6-fpm restart
4, 在IDE中添加Debug的Host和Port,進入PhpStorm->File->Settings->Languages & Frameworks->Servers->
保存后,此時可以在具體的代碼文件頁面看到debug的標識,
在這里單擊一下,有一個紅色的圓圈,代表在此處設置一個斷點(break point)
用Postman請求到這個文件,可以看到在IDE下方,出現了很多信息
這些變量值直接展示出來了,而不要再另外去打斷點來查看。
當然,以上只是xdebug很小的一部分功能。更重要的是用來做性能分析,代碼邏輯優化等,這個過一段時間再來更新。
更多關于云服務器,域名注冊,虛擬主機的問題,請訪問三五互聯官網:m.shinetop.cn