mac sublime3+xdebug+firefox調試環境的搭建

來源:互聯網
上載者:User
第一步:配置php xdebug擴充

[xdebug]
zend_extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey="sublime.xdebug"
xdebug.remote_log="/var/log/xdebug/xdebug.log"

第二步:安裝sublime xdebugclient(不是xdebug)

第三步:安裝php xdebug擴充

sublime中安裝sublime xdebug client,此處一定要安裝帶client的,而不是sublime xdebug。注意安裝完成後,在sublime中ctrl+shift+p ,輸入xdebug,如果出現以下這些選項,則已經安裝成功。

第四步:配置sublime xdebug

用sublime開啟你要調試的程式,點擊sublime導航的Project->save project as。產生一個.sublime-project的檔案,修改其為:


下面是我的MAC配置

{
"folders":
[
{
"path": "/Applications/xampp/xamppfiles/htdocs"
}
],
"settings":
{
"xdebug": {
"path_mapping": {
},
"url": "http://127.0.0.1/test.php",
"super_globals": true,
"close_on_stop": true,
"port": 9000
}
}
}

第五步:下載firebox外掛程式easiest Xdebug

點擊綠色的小爬蟲,點亮代表調試狀態開啟,第一次不點擊開啟,調試無效

第六步:測試調試

在待調試的檔案中加斷點之後,在sublime中 tools --> xdebug --> 開始調試 。此時在瀏覽器中開上面配置步驟中所設定的url:http://127.0.0.1/test.php,進入斷點,完成調試。

著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

以上就介紹了mac sublime3+xdebug+firefox調試環境的搭建,包括了方面的內容,希望對PHP教程有興趣的朋友有所協助。

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.