NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

[Solved] Xdebug 2.0.5 (PHP5.3.0) debugging issue

 
Post new topic   Reply to topic    NetBeans Forums -> PHP Users
View previous topic :: View next topic  
Author Message
Freman



Joined: 25 Aug 2009
Posts: 4

PostPosted: Wed Nov 04, 2009 6:49 am    Post subject: [Solved] Xdebug 2.0.5 (PHP5.3.0) debugging issue Reply with quote

Greetings.

I'm afraid I can't get Xdebug to work.

Vital Stats:
PHP 5.3.0 (cli) (built: Oct 9 2009 19:59:11)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans

Product Version: NetBeans IDE 6.8 M2 (Build 200910071658)
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
System: Linux version 2.6.31-14-generic running on i386; UTF-8; en_AU (nb)
Userdir: /home/freman/.netbeans/6.8m2

I freshly upgraded to NetBeans IDE 6.8 M2 to see if that would resolve my issue.

if I use xdebug_break(); the IDE correctly breaks, but no breakpoints I set in the IDE work, and "Stop at the First Line" doesn't work

I've configured the webroot to be 'root' under the source folder

Dump from "stop at first line" + a few break points set - booting to /root/index.php

Quote:
<?xml version="1.0" encoding="UTF-8"?>
<init appid="10844" fileuri="file:///www/{sanitized}/root/index.php" hostname="127.0.0.1" idekey="freman" language="PHP" protocol_version="1.0" proxied="true" xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"><engine version="2.0.5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2009 by Derick Rethans]]></copyright></init>FINE [org.netbeans.modules.php.dbgp.packets.DbgpCommand]: command to send : feature_set -i 0 -n show_hidden -v 1
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="0" feature="show_hidden" success="1"></response>FINE [org.netbeans.modules.php.dbgp.packets.DbgpCommand]: command to send : feature_set -i 1 -n max_depth -v 3
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="max_depth" success="1"></response>FINE [org.netbeans.modules.php.dbgp.packets.DbgpCommand]: command to send : feature_set -i 2 -n max_children -v 31
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_children" success="1"></response>FINE [org.netbeans.modules.php.dbgp.packets.DbgpCommand]: command to send : feature_get -i 3 -n max_data
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="3" feature_name="max_data" supported="1"><![CDATA[1024]]></response>FINE [org.netbeans.modules.php.dbgp.packets.DbgpCommand]: command to send : breakpoint_set -i 4 -t line -s enabled -f file:///www/{sanitized}/include/classes/Decimal.php -n 82
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="4" state="enabled" id="108440006"></response>FINE [org.netbeans.modules.php.dbgp.packets.DbgpCommand]: command to send : breakpoint_set -i 5 -t line -s enabled -f file:///www/{sanitized}/root/index.php -n 8
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5" state="enabled" id="108440007"></response>FINE [org.netbeans.modules.php.dbgp.packets.DbgpCommand]: command to send : breakpoint_set -i 6 -t line -s enabled -f file:///www/{sanitized}/root/index.php -n 1
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" state="enabled" id="108440008"></response>FINE [org.netbeans.modules.php.dbgp.packets.DbgpCommand]: command to send : step_into -i 7
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="7" status="stopping" reason="ok"></response>
FINE [org.netbeans.modules.php.dbgp.ServerThread]
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.netbeans.modules.php.dbgp.ServerThread.run(ServerThread.java:47)
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)
[catch] at java.lang.Thread.run(Thread.java:619)
FINE [org.netbeans.modules.php.dbgp.ServerThread]
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.netbeans.modules.php.dbgp.ServerThread.run(ServerThread.java:47)
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)
[catch] at java.lang.Thread.run(Thread.java:619)


Last edited by Freman on Thu Nov 05, 2009 1:10 am; edited 1 time in total
Back to top
AGeorge



Joined: 25 Jun 2009
Posts: 10

PostPosted: Wed Nov 04, 2009 9:28 pm    Post subject: Reply with quote

When you look at phpinfo does it show that xdebug has been instantiated?
If so and your break on first line is set, then it should break.
If not then check the xdebug is suited to the version of PHP that you are using.
Al
Back to top
Freman



Joined: 25 Aug 2009
Posts: 4

PostPosted: Wed Nov 04, 2009 10:21 pm    Post subject: Reply with quote

Well, 2.0.5 is the latest released XDebug, and yes it appears to be working (in the quote you can see xdebug talking to netbeans and visa versa...)

It's not breaking on line break lines set in netbeans.
It's not breaking on the first line as configured in netbeans.
It is breaking when I physically insert xdebug_break() in the code.

I'm not sure if it's netbeans or xdebug, I don't understand the xdebug protocol enough.

Code:
FINE [org.netbeans.modules.php.dbgp.packets.DbgpCommand]: command to send : step_into -i 7


This appears to be netbeans telling xdebug to step into line 7 of the file...

Code:
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="7" status="stopping" reason="ok"></response>


And this appears to be xdebug's response... but after that I don't know what's supposed to happen...
Back to top
Freman



Joined: 25 Aug 2009
Posts: 4

PostPosted: Thu Nov 05, 2009 1:09 am    Post subject: Reply with quote

Solved.

This was set in php.ini

xdebug.extended_info=0

It can't be overridden anywhere, not locally, not in apache via php_value settings.
Back to top
vuklaca



Joined: 06 Nov 2009
Posts: 1

PostPosted: Fri Nov 06, 2009 7:26 pm    Post subject: Reply with quote

Hello there,

xdebug.extended_info is set to 1 for me, but I have the same problem... execution only breaks when I call xdebug_break()...

I use netbeans 6.7. and xampp 1.7.1 (php 5.2.9, xdebug 2.0.4)

Help much appreciated.
Back to top
Horslemonde



Joined: 20 Jan 2010
Posts: 4

PostPosted: Thu Jun 24, 2010 9:47 pm    Post subject: Reply with quote

Hello
I have the same problem. My environment is:
Vista 32 ultimate,
Netbeans 6.9
Easyphp 5.3.2i(php 5.3.2, apache 2.2.15)
my phpini xdebug declare is:
Code:

zend_extension="D:\Program Files\EasyPHP-5.3.2i\php\ext\php_xdebug-2.1.0RC1-5.3-vc6.dll"
xdebug.remote_enable=1
xdebug.remote_host="127.0.0.1"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_mode=req
xdebug.extended_info=1
xdebug.profiler_enable=0
xdebug.profiler_output_dir="D:\Program Files\EasyPHP-5.3.2i\php\tmp"
xdebug.collect_params=On
xdebug.show_local_vars=On

phpinfo indicates :
Quote:
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.1.0rc1, Copyright (c) 2002-2010, by Derick Rethans

xdebug extension is present and seems to be well configured.
Any help very appreciated as i have been blocking for more than 10 days without solving this problem!
Back to top
kenorb



Joined: 15 Feb 2010
Posts: 3

PostPosted: Mon Sep 06, 2010 12:27 pm    Post subject: Breakpoints created by NetBeans doesn't work! Reply with quote

Exactly the same problem.
Breakpoints created by NetBeans simply doesn't work, but xdebug_break() does work.

Environment:
NetBeans IDE 6.8 (Build 200912041610) on Linux
PHP 5.2.6-3ubuntu4.5
xdebug support => enabled
xdebug: 2.1.0beta3-dev

HTTP_COOKIE: XDEBUG_SESSION=XDEBUG_SESSION_START

Configuration of php.ini:
Code:

extension=xdebug.so

[debug] ; Remote settings
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000 ; General
xdebug.idekey=1
xdebug.collect_includes=on
xdebug.default_enable=on
xdebug.remote_log = /var/log/xdebug/xdebug.log

xdebug.profiler_output_dir = /var/log/xdebug
xdebug.trace_output_dir = /var/log/xdebug
xdebug.profiler_output_name = "cachegrind.out.%H-%R_%u.log"
xdebug.trace_output_name = "trace.%H-%R_%u.log"
xdebug.show_local_vars = on
xdebug.collect_return = on
xdebug.collect_vars = on
xdebug.collect_params = 4
xdebug.var_display_max_children = 2560
xdebug.var_display_max_data = 6024
xdebug.var_display_max_depth = 6
xdebug.max_nesting_level=500



Log:
Code:

Log opened at 2010-09-06 12:21:56
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/kenorb/websites/doc/trunk/src/index.php" language="PHP" protocol_version="1.0" appid="23297" idekey="XDEBUG_SESSION_START"><engine version="2.1.0beta3-dev"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2010 by Derick Rethans]]></copyright></init>

<- feature_set -i 383 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="383" feature="show_hidden" success="1"></response>

<- feature_set -i 384 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="384" feature="max_depth" success="1"></response>

<- feature_set -i 385 -n max_children -v 31
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="385" feature="max_children" success="1"></response>

<- feature_get -i 386 -n max_data
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="386" feature_name="max_data" supported="1"><![CDATA[1024]]></response>

<- breakpoint_set -i 387 -t line -s enabled -f file:///home/kenorb/websites/doc/trunk/src/index.php -n 16
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="387" state="enabled" id="232970003"></response>

<- breakpoint_set -i 388 -t line -s enabled -f file:///home/kenorb/websites/doc/trunk/src/index.php -n 18
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="388" state="enabled" id="232970004"></response>

<- step_into -i 389
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="389" status="stopping" reason="ok"></response>

Log closed at 2010-09-06 12:21:57


Why???;(
It's not solved!
Back to top
kenorb



Joined: 15 Feb 2010
Posts: 3

PostPosted: Mon Sep 06, 2010 2:20 pm    Post subject: Reply with quote

xdebug log available here: http://pastebin.com/guTytDbC
Back to top
Filip Zamboj
Posted via mailing list.





PostPosted: Sat Sep 11, 2010 4:26 pm    Post subject: [Solved] Xdebug 2.0.5 (PHP5.3.0) debugging issue Reply with quote

I didn't go through log but could you try with 6.9.1 or 6.10m1 or
development version from http://bertram.netbeans.org/hudson/job/PHP-Build/?

On 09/06/2010 02:27 PM, kenorb wrote:
Quote:
Exactly the same problem.
Breakpoints created by NetBeans simply doesn't work, but xdebug_break() does work.

Environment:
NetBeans IDE 6.8 (Build 200912041610) on Linux
PHP 5.2.6-3ubuntu4.5
xdebug support => enabled
xdebug: 2.1.0beta3-dev

HTTP_COOKIE: XDEBUG_SESSION=XDEBUG_SESSION_START

Configuration of php.ini:

Code:

extension=xdebug.so

[debug] ; Remote settings
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000 ; General
xdebug.idekey=1
xdebug.collect_includes=on
xdebug.default_enable=on
xdebug.remote_log = /var/log/xdebug/xdebug.log

xdebug.profiler_output_dir = /var/log/xdebug
xdebug.trace_output_dir = /var/log/xdebug
xdebug.profiler_output_name = "cachegrind.out.%H-%R_%u.log"
xdebug.trace_output_name = "trace.%H-%R_%u.log"
xdebug.show_local_vars = on
xdebug.collect_return = on
xdebug.collect_vars = on
xdebug.collect_params = 4
xdebug.var_display_max_children = 2560
xdebug.var_display_max_data = 6024
xdebug.var_display_max_depth = 6
xdebug.max_nesting_level=500





Log:

Code:

Log opened at 2010-09-06 12:21:56
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/kenorb/websites/doc/trunk/src/index.php" language="PHP" protocol_version="1.0" appid="23297" idekey="XDEBUG_SESSION_START"><engine version="2.1.0beta3-dev"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2010 by Derick Rethans]]></copyright></init>

<- feature_set -i 383 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="383" feature="show_hidden" success="1"></response>

<- feature_set -i 384 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="384" feature="max_depth" success="1"></response>

<- feature_set -i 385 -n max_children -v 31
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="385" feature="max_children" success="1"></response>

<- feature_get -i 386 -n max_data
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="386" feature_name="max_data" supported="1"><![CDATA[1024]]></response>

<- breakpoint_set -i 387 -t line -s enabled -f file:///home/kenorb/websites/doc/trunk/src/index.php -n 16
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="387" state="enabled" id="232970003"></response>

<- breakpoint_set -i 388 -t line -s enabled -f file:///home/kenorb/websites/doc/trunk/src/index.php -n 18
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="388" state="enabled" id="232970004"></response>

<- step_into -i 389
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="389" status="stopping" reason="ok"></response>

Log closed at 2010-09-06 12:21:57




Why???;(



Back to top
areeda



Joined: 28 Aug 2008
Posts: 487
Location: Los Angeles

PostPosted: Sat Sep 11, 2010 4:39 pm    Post subject: Reply with quote

I concur.

6.10m1 and xdebug 2.1.0 work but 6.8 with the same sever does not on my Ubuntu 10.04/64 system.

Joe
Back to top
reinhardt



Joined: 06 Mar 2011
Posts: 1

PostPosted: Sun Mar 06, 2011 9:19 am    Post subject: Breakpoints works with MAC OSX 10.6 Reply with quote

Hi,

Breakpoints works well in my case with the following parameters on MAC OSX 10.6.


zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so
xdebug.remote_enable=on
xdebug.remote_log="/var/log/xdebug.log"
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.var_display_max_children = 2560
xdebug.var_display_max_data = 6024
xdebug.var_display_max_depth = 6
xdebug.max_nesting_level=500


have you installed firefox addon for xdebug?
maybe that is the reason?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> PHP Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo