解析phpstorm + xdebug 遠(yuǎn)程斷點(diǎn)調(diào)試
更新時(shí)間:2013年06月20日 08:46:56 作者:
本篇文章是對(duì)phpstorm + xdebug 遠(yuǎn)程斷點(diǎn)調(diào)試進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下
XDEBUG配置:
1.安裝 xdebug 略了。網(wǎng)上有很多資料。
重點(diǎn)寫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 //如果開(kāi)啟此,將忽略下面的 xdebug.remote_host 的參數(shù)。 <一臺(tái)webserver有多個(gè)開(kāi)發(fā)者的工作目錄的時(shí)候使用,如:p1.xx.com,p2.xx.com,p3.xx.com 。。。等。 >
xdebug.remote_host = 192.168.59.104 //注意這里是,客戶端的ip<即IDE的機(jī)器的ip,不是你的web server>
xdebug.remote_port = 9900 // 注意這里是,客戶端的端口<即IDE的機(jī)器的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右側(cè)。xdebug的那一塊。 設(shè)置Debug port:9900(這里設(shè)置 的是,xdebug 吐出的debug信息,通過(guò)本機(jī)的什么端口傳輸。)
2.file->setings->php|Servers 右側(cè)。 host: 你的web服務(wù)器的域名或ip ,端口, 下面的 use path mapping 意的是,你的項(xiàng)目的目錄,對(duì)應(yīng)服務(wù)器上的,什么目錄? 這里一定要設(shè)置哦! 不然,會(huì)發(fā)生找不到文件而出錯(cuò),導(dǎo)至調(diào)試終止。
3.Run->Edit Configurations-> 增加一個(gè) PHP WEB APPlication 的調(diào)試點(diǎn)。 右側(cè): server 選擇你上面建立的server. starturl 設(shè)置你的入口文件。
至此,配置完畢!
這樣的請(qǐng)求,可以注冊(cè)一個(gè)調(diào)試客戶端哦!
http://www.aihuxi.com/****.php?XDEBUG_SESSION_START=19192
點(diǎn)擊,小蟲子圖標(biāo),即可,開(kāi)始調(diào)試!
1.安裝 xdebug 略了。網(wǎng)上有很多資料。
重點(diǎn)寫php.ini的配置
[XDebug]
復(fù)制代碼 代碼如下:
zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.default_enable = On
xdebug.collect_params = On
xdebug.remote_connect_back = On //如果開(kāi)啟此,將忽略下面的 xdebug.remote_host 的參數(shù)。 <一臺(tái)webserver有多個(gè)開(kāi)發(fā)者的工作目錄的時(shí)候使用,如:p1.xx.com,p2.xx.com,p3.xx.com 。。。等。 >
xdebug.remote_host = 192.168.59.104 //注意這里是,客戶端的ip<即IDE的機(jī)器的ip,不是你的web server>
xdebug.remote_port = 9900 // 注意這里是,客戶端的端口<即IDE的機(jī)器的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右側(cè)。xdebug的那一塊。 設(shè)置Debug port:9900(這里設(shè)置 的是,xdebug 吐出的debug信息,通過(guò)本機(jī)的什么端口傳輸。)
2.file->setings->php|Servers 右側(cè)。 host: 你的web服務(wù)器的域名或ip ,端口, 下面的 use path mapping 意的是,你的項(xiàng)目的目錄,對(duì)應(yīng)服務(wù)器上的,什么目錄? 這里一定要設(shè)置哦! 不然,會(huì)發(fā)生找不到文件而出錯(cuò),導(dǎo)至調(diào)試終止。
3.Run->Edit Configurations-> 增加一個(gè) PHP WEB APPlication 的調(diào)試點(diǎn)。 右側(cè): server 選擇你上面建立的server. starturl 設(shè)置你的入口文件。
至此,配置完畢!
這樣的請(qǐng)求,可以注冊(cè)一個(gè)調(diào)試客戶端哦!
http://www.aihuxi.com/****.php?XDEBUG_SESSION_START=19192
點(diǎn)擊,小蟲子圖標(biāo),即可,開(kāi)始調(diào)試!
您可能感興趣的文章:
- Vagrant(WSL)+PHPStorm+Xdebu 斷點(diǎn)調(diào)試環(huán)境搭建
- PhpStorm本地?cái)帱c(diǎn)調(diào)試的方法步驟
- Phpstorm+Xdebug斷點(diǎn)調(diào)試PHP的方法
- PHPStorm+Xdebug進(jìn)行emote Debug時(shí)無(wú)法進(jìn)入斷點(diǎn)問(wèn)題排查
- phpstorm配置Xdebug進(jìn)行調(diào)試PHP教程
- PHPStorm+XDebug進(jìn)行調(diào)試圖文教程
- 使用PHPStorm+XDebug搭建單步調(diào)試環(huán)境
- PhpStorm 如何優(yōu)雅的調(diào)試Hyperf的方法步驟
- PhpStorm配置Xdebug調(diào)試的方法步驟
- 使用phpstorm和xdebug實(shí)現(xiàn)遠(yuǎn)程調(diào)試的方法
- 圖文詳解phpstorm配置Xdebug進(jìn)行調(diào)試PHP教程
- phpstorm斷點(diǎn)調(diào)試方法圖文詳解
相關(guān)文章
PHP 使用header函數(shù)設(shè)置HTTP頭的示例解析 表頭
本篇文章是對(duì)PHP使用header函數(shù)設(shè)置HTTP頭的示例進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下2013-06-06數(shù)據(jù)庫(kù)中排序的對(duì)比及使用條件詳解
PHP與MySQL數(shù)據(jù)庫(kù)中排序的對(duì)比及使用條件是本文我們主要要介紹的內(nèi)容,通常來(lái)說(shuō),執(zhí)行效率需要考慮CPU、內(nèi)存和硬盤等的負(fù)載情況2012-02-02PHP使用DOM和simplexml讀取xml文檔的方法示例
這篇文章主要介紹了PHP使用DOM和simplexml讀取xml文檔的方法,結(jié)合實(shí)例形式分析了php使用DOM及simplxml針對(duì)xml文件的創(chuàng)建、載入、讀取等相關(guān)操作技巧,需要的朋友可以參考下2017-02-02php讀取遠(yuǎn)程gzip壓縮網(wǎng)頁(yè)的方法
這篇文章主要介紹了php讀取遠(yuǎn)程gzip壓縮網(wǎng)頁(yè)的方法,當(dāng)站點(diǎn)使用gzip壓縮時(shí),使用常規(guī)的遠(yuǎn)程獲取方法會(huì)得到亂碼結(jié)果,使用本文方法即可解決這個(gè)問(wèn)題,需要的朋友可以參考下2014-12-12PHP學(xué)習(xí)之?dāng)?shù)組的定義和填充
先了解一下數(shù)組,數(shù)組就是把一組數(shù)據(jù)按順序放在一起。PHP的數(shù)組和其它的語(yǔ)言數(shù)組有一點(diǎn)點(diǎn)不同:第一,保存的數(shù)據(jù)是可以是任何類型的;第二,數(shù)組的索引可以是數(shù)字,也可以是字符串。2011-04-04PHP實(shí)現(xiàn)JS中escape與unescape的方法
這篇文章主要介紹了PHP實(shí)現(xiàn)JS中escape與unescape的方法,通過(guò)json_encode和json_decode方法實(shí)現(xiàn)JS中escape與unescape函數(shù)的功能,需要的朋友可以參考下2016-07-07