【PHP Debug】Visual Studio Code 除錯外掛

徐俊發表於2017-07-13

【前言】:斷點除錯是許多程式設計師很喜歡的功能,本文通過 Visual Studio Code(簡稱 VSC)來演示,希望能夠幫助到有需要的同學,至於為什麼選擇 VSC 是基於以下幾點

  • 經濟性:免費 & 開源
  • 輕量化:體積/系統資源
  • 本地化:官方中文版
  • 可靠性:微軟出品
  • 擴充套件性:外掛多支援多種語言

【安裝】:https://code.visualstudio.com/

file

【外掛】:下載安裝外掛 PHP Debug (安裝後需重啟編輯器)

file

【XDebug】:注意由於本人的環境是 WAMP 3.0 所以預設會安裝 Xebug 所以請小夥伴務必檢查自己的是否已經安裝了 Xebug

# @ 配置 php.ini 並重啟 Apache
...
xdebug.remote_enable = On
xdebug.remote_autostart = On
...

file

【VSC配置】:

file
file
file
file
file
file
【除錯】:
file
file

【參考文章】:

http://www.cnblogs.com/CLR010/p/5276077.html

http://blog.csdn.net/x356982611/article/details/52664334

https://github.com/felixfbecker/vscode-php-debug

相關文章