PHPStorm XDebug的安裝

來源:互聯網
上載者:User

標籤:extension   dir   ges   com   art   web app   源碼   gnu   bug   

環境: 

      我的系統: 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

  PHP的版本 :PHP 5.5.15 (cli)

      window直接下載對應PHP版本的XDebug模組,不用自己編譯.

  linux下載xdebug的源碼,進行編譯.

       XDebug下載網址: https://xdebug.org/download.php

1) PHP 安裝擴充模組 -- XDebug ,按照說明編譯得到的xdebug.so拷貝到下面zend_extension的路徑裡面:

  查看php的安裝資訊 ,運行:  

1 php -r  "phpinfo();"
View Code

   我的php.ini在

  extension_dir在

  編輯該檔案,加入如下代碼:

1 zend_extension = /opt/lampp/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so2 xdebug.remote_host = 127.0.0.13 xdebug.remote_enable = 14 xdebug.remote_port = 90005 xdebug.remote_handler = dbgp6 xdebug.remote_mode = req
View Code

  重啟伺服器,執行下面命令 可以看到XDebug模組.

1 php -m 
View Code

 

2) PHPStorm的配置:

   菜單  File -> setting 視窗開啟後,左上方搜尋: debug ,在 Debug Port 填寫上面php.ini中的值,這裡是9000.

    點擊右上方電話表徵圖坐左邊的那個向下的箭頭,配置開發環境:

   server的配置

    php web application的配置:

  最後,點擊右上方的蟲子可以進行調試了.

  

  
      

PHPStorm XDebug的安裝

聯繫我們

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