簡體   English   中英

將xdebug與Netbeans一起用於php-套接字異常

[英]Using xdebug with Netbeans for php - socket exception

我正在嘗試使用Netbeans使用xdebug進行php調試,但是在Netbeans中引發了Socket Exception。 它正確地在斷點處停止,但是當我單擊以“跳過”或“進入”或任何其他內容時,它將顯示套接字異常並崩潰。 在這里的任何幫助將不勝感激,我花了很多時間試圖解決這個問題。

我正在運行的環境是:

Mac OSX 10.7.4
Netbeans IDE 7.2
MAMP Version 2.1.1
php5.4.4
xdebug

從phpinfo:

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with XCache v2.0.0, Copyright (c) 2005-2012, by mOo
with Xdebug v2.2.0, Copyright (c) 2002-2012, by Derick Rethans

從php.ini:

xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.remote_log="/Applications/MAMP/logs/xdebug_remote.log"

zend_extension="/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"

發生異常時,我的IDE日志的輸出如下。

INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.csl.hints.GsfHintsProvider ignored cancel for 266 ms.
INFO [org.netbeans.modules.php.dbgp.URIMapper]: class org.netbeans.modules.php.dbgp.URIMapper$1: /Applications/MAMP/htdocs/glog/index.php -> file:///Applications/MAMP/htdocs/glog/index.php
INFO [org.netbeans.modules.php.dbgp.URIMapper]: class org.netbeans.modules.php.dbgp.URIMapper$1: /Users/Manachi/Work/myapp/index.php -> file:///Users/Manachi/Work/myapp/index.php
INFO [org.netbeans.modules.php.dbgp.URIMapper]: class org.netbeans.modules.php.dbgp.URIMapper$1: /Users/Manachi/Work/adwaf/php/adwaf/portal/index.php -> file:///Users/Manachi/Work/adwaf/php/adwaf/portal/index.php
INFO [org.netbeans.modules.php.dbgp.URIMapper]: class org.netbeans.modules.php.dbgp.URIMapper$1: file:///Users/Manachi/Work/adwaf/php/adwaf/portal/index.php -> /Users/Manachi/Work/adwaf/php/adwaf/portal/index.php
SEVERE [org.netbeans.modules.php.dbgp.packets.DbgpMessage]
SEVERE [org.netbeans.modules.php.dbgp.packets.DbgpMessage]
INFO [org.netbeans.modules.php.dbgp.DebugSession]
java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:124)
    at org.netbeans.modules.php.dbgp.packets.DbgpCommand.send(DbgpCommand.java:92)
    at org.netbeans.modules.php.dbgp.DebugSession.sendCommands(DebugSession.java:211)
[catch] at org.netbeans.modules.php.dbgp.DebugSession.run(DebugSession.java:143)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)

您正在運行Xdebug的舊版本(已知版本已損壞)。 您要使用最新版本(目前為2.2.1)。 其次,眾所周知,XCache也會干擾Xdebug,因此您也希望禁用它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM