解析phpstorm + xdebug 遠程斷點調試_PHP教程

來源:互聯網
上載者:User
XDEBUG配置:
1.安裝 xdebug 略了。網上有很多資料。
重點寫php.ini的配置
[XDebug]
複製代碼 代碼如下:
zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.default_enable = On
xdebug.collect_params = On
xdebug.remote_connect_back = On //如果開啟此,將忽略下面的 xdebug.remote_host 的參數。 <一台webserver有多個開發人員的工作目錄的時候使用,如:p1.xx.com,p2.xx.com,p3.xx.com 。。。等。 >
xdebug.remote_host = 192.168.59.104 //注意這裡是,用戶端的ip<即IDE的機器的ip,不是你的web server>
xdebug.remote_port = 9900 // 注意這裡是,用戶端的連接埠<即IDE的機器的ip,不是你的web server>
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_log = "/var/www/xdebug/xdebug.log"
xdebug.remote_req = req
xdebug.auto_trace = Off
xdebug.remote_autostart = On
xdebug.show_exception_trace = 0
xdebug.collect_vars = On
xdebug.collect_return = On
xdebug.collect_params = On
xdebug.var_display_max_depth = 15
xdebug.show_local_vars = 1
xdebug.dump_undefined = 1
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = /var/www/xdebug

PHPSTORM 配置:
1.file->setings->php|Debug右側。xdebug的那一塊。 設定Debug port:9900(這裡設定 的是,xdebug 吐出的debug資訊,通過原生什麼連接埠傳輸。)
2.file->setings->php|Servers 右側。 host: 你的web伺服器的網域名稱或ip ,連接埠, 下面的 use path mapping 意的是,你的項目的目錄,對應伺服器上的,什麼目錄? 這裡一定要設定哦! 不然,會發生找不到檔案而出錯,導至調試終止。
3.Run->Edit Configurations-> 增加一個 PHP WEB APPlication 的調試驗。 右側: server 選擇你上面建立的server. starturl 設定你的入口檔案。
至此,配置完畢!
這樣的請求,可以註冊一個調試用戶端哦!
http://www.aihuxi.com/****.php?XDEBUG_SESSION_START=19192
點擊,小蟲子表徵圖,即可,開始調試!

http://www.bkjia.com/PHPjc/327681.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/327681.htmlTechArticleXDEBUG配置: 1.安裝 xdebug 略了。網上有很多資料。 重點寫php.ini的配置 [XDebug] 複製代碼 代碼如下: zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"...

  • 聯繫我們

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