Xampp+Chrome+Sublime Text3+Xdebug調試PHP代碼

來源:互聯網
上載者:User
===========xampp安裝與xdebug配置

1. 下載安裝xampp5.5或最新版本

2. 修改%xampp%/php/php.ini中的[XDebug]節點,取消注釋(移出行首的 ; 字元)

3. 點擊xampp control中的 admin,查看phpinfo如下

===========chrome的xdebug擴充安裝

1. 安裝最新的chrome

2. 安裝xdebug擴充外掛程式

https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?utm_source=chrome-app-launcher-info-dialog

3. 設定xdebug外掛程式如。

IDE Key選擇Other輸入sublime.xdebug


===========sublime安裝與配置

1. 下載sunblime text3(sublime text2 測試不成功,不可以進入斷點)

2. 安裝package control https://packagecontrol.io/installation#st3

3. 安裝xdebug client, 注意查看最下側邊欄的安裝結果

4. 建立test.php檔案,加入相關斷點。

5. save project as然後edit project檔案,加入如下

專案檔設定代碼(path為項目所在根目錄,url為HTTP訪問地址):

{
"folders":
[
{
"path": "/C/Program Files/XAMPP/htdocs/test"
}
],
"settings":
{
"xdebug": {
"url": "http://localhost/test/test.php"
}
}
}

6. 按ctrl + shift + p,輸入xdebug: start debuging(lancuh browser)

7. 如果成功的話瀏覽器開啟頁面時,sublime text中設定的斷點會進入

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.