首頁  >  文章  >  後端開發  >  mac sublime3+xdebug+firefox調試環境的搭建

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

WBOY
WBOY原創
2016-07-30 13:30:322098瀏覽

第一步:設定php xdebug擴充

[xdebug]
zend_extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20121212/xdebug.. xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey="sublime.xdebug"
xdebug.remote_bug/var/log/sublime.xdebug"
xdebug.remote_buglog/步驟:安裝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":ampah [

{
  「 /htdocs"
    }
  ],
  "settings":
  {
    "xdebug": {
  "path_mapping": {
:==, "super_globals": true,
  "close_on_stop": true,
  "port": 9000   
        }
  }
}開啟,第一次不點選開啟,調試無效

第六步:測試調試

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

版權聲明:本文為部落客原創文章,未經部落客允許不得轉載。

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


陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn