FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

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

Xdebug doesn't stop at breakpoints

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



Joined: 22 Feb 2009
Posts: 3

PostPosted: Sun Feb 22, 2009 12:13 pm    Post subject: Xdebug doesn't stop at breakpoints Reply with quote

Hi all.

I have such a problem:

When I start to debug script with xdebug it doesn't stop at any point neither first line nor any other checked breakpoint. In browser page is running as usually.
But if put in code function
Code:
xdebug_break();
running of program stops at this point and i can check all watches that i need. The problem is that before
Code:
xdebug_break();
will not finish the browser doesn't show anything on the screen.

Where can be the problem?

Here is debuglog:
Quote:
Log opened at 2009-02-22 12:12:18
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/Stomat_32/index.php" language="PHP" protocol_version="1.0" appid="23013" idekey="netbeans-xdebug"><engine version="2.0.4"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2008 by Derick Rethans]]></copyright></init>

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

<- breakpoint_set -i 363 -t line -s enabled -f file:///var/www/Stomat_32/index.php -n 11
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="363" state="enabled" id="230130003"></response>

<- breakpoint_set -i 364 -t line -s enabled -f file:///var/www/Stomat_32/index.php -n 22
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="364" state="enabled" id="230130004"></response>

<- breakpoint_set -i 365 -t line -s enabled -f file:///var/www/Stomat_32/index.php -n 24
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="365" state="enabled" id="230130005"></response>

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

Log closed at 2009-02-22 12:12:19
Back to top
View user's profile Send private message
ypeskov



Joined: 22 Feb 2009
Posts: 3

PostPosted: Thu Feb 26, 2009 9:20 am    Post subject: Reply with quote

so no ideas? Sad
Back to top
View user's profile Send private message
radek matous
Posted via mailing list.





PostPosted: Thu Feb 26, 2009 9:38 am    Post subject: Xdebug doesn't stop at breakpoints Reply with quote

ypeskov wrote:
Quote:
so no ideas? :(



Hi,

really no idea (log listing seems OK), but you can send me your netbeans
project and I can look at it.

Radek
Back to top
nightreveller



Joined: 26 Feb 2009
Posts: 6

PostPosted: Thu Feb 26, 2009 9:25 pm    Post subject: Reply with quote

Same problem here: XDebug doens't stop at breakpoints (but does at xdebug_break())

System: XAMPPlite + Netbeans (about info):
Product Version: NetBeans IDE 6.5 (Build 200811100001)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b15
System: Windows Vista version 6.0 running on x86; Cp1252; nl_NL (nb)
Userdir: C:\Users\admin\.netbeans\6.5

I'll attach a simple project.

Thank you for looking into this!



netbeans_test.zip
 Description:

Download
 Filename:  netbeans_test.zip
 Filesize:  2.58 KB
 Downloaded:  60 Time(s)

Back to top
View user's profile Send private message
Adarsh LR
Posted via mailing list.





PostPosted: Fri Feb 27, 2009 3:08 pm    Post subject: Framework Support in Netbeans Reply with quote

Hi

I am a PHP Netbeans user who wants to start using PHP frameworks — Zend, symfony, and CakePHP.
Are there any tutorials in Netbeans while building and extending a sample application in each of the three frameworks

Regards
Adarsh LR


Check out the all-new Messenger 9.0! Go to http://in.messenger.yahoo.com/
Back to top
radek matous
Posted via mailing list.





PostPosted: Fri Feb 27, 2009 9:44 pm    Post subject: Xdebug doesn't stop at breakpoints Reply with quote

nightreveller wrote:
Quote:
Same problem here: XDebug doens't stop at breakpoints (but does at xdebug_break())



System: XAMPPlite + Netbeans (about info):

Product Version: NetBeans IDE 6.5 (Build 200811100001)

Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b15

System: Windows Vista version 6.0 running on x86; Cp1252; nl_NL (nb)

Userdir: C:\Users\admin\.netbeans\6.5



I'll attach a simple project.



Thank you for looking into this!

Hi,

I'm sorry I've tested netbeans_test_132.zip and it worked for me. Tested
on Linux, Mac, Win XP not Vista (used already installed jdk, not exactly
1.6.0_10-rc )

You could put into your php.ini setting like this:
xdebug.remote_log=/tmp/xdebug.log (see
http://www.xdebug.org/docs/all_settings) and restart apache server.
FYI - xdebug.remote_log setting allows you to log debugger communication.

Radek
Quote:



Attachments:
http://forums.netbeans.org//files/netbeans_test_132.zip







Back to top
nightreveller



Joined: 26 Feb 2009
Posts: 6

PostPosted: Fri Feb 27, 2009 11:39 pm    Post subject: Reply with quote

Hi Radek,

Thank you for testing this!

I followed your advice to set xdebug.remote_log. The output for a run with a breakpoint on line 7 is in the attached xdebug_breakpoint.log.txt

I also ran the project without breakpoints and with xdebug_break() set. The output is in xdebug_xdebug_break.log.txt

Besides this problem I have more issues with debugging in Netbeans (using xdebug_break()):
* Clicking 'Step Into' doesn't move a line forward but runs the entire script and finishes.
* The local variables pane never contains any other variables than the Superglobals.
* Hovering over scalar variables will show their value as expected but hovering over an array doesn't.

Could all this be caused by jdk 1.6.0_10-rc?

Thanx for looking into this!

-NR



xdebug_xdebug_break.log.txt
 Description:

Download
 Filename:  xdebug_xdebug_break.log.txt
 Filesize:  19.66 KB
 Downloaded:  127 Time(s)


xdebug_breakpoint.log.txt
 Description:

Download
 Filename:  xdebug_breakpoint.log.txt
 Filesize:  1.21 KB
 Downloaded:  77 Time(s)

Back to top
View user's profile Send private message
ypeskov



Joined: 22 Feb 2009
Posts: 3

PostPosted: Sat Feb 28, 2009 10:07 am    Post subject: Reply with quote

I've solved my problem Smile

the answer was quite simple

I read once again tutorial http://www.netbeans.org/kb/docs/php/configure-php-environment-ubuntu.html

and changed my /etc/php5/apache2/php.ini from
Quote:

extension=xdebug.so
xdebug.default_enable = On
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_port = 9000
xdebug.idekey = netbeans-xdebug
xdebug.remote_log = /tmp/xdebug.log


to next lines:
Quote:

zend_extension = /usr/lib/php5/20060613+lfs/xdebug.so
xdebug.remote_enable = on


Everything is working normal now Smile
And now I have one more a little question. As I understand I will not see output in browser before end of debuging?
Back to top
View user's profile Send private message
nightreveller



Joined: 26 Feb 2009
Posts: 6

PostPosted: Sat Feb 28, 2009 12:59 pm    Post subject: Reply with quote

What I've tried:

- solution above from ypeskov
- installing the most recent version of Java: 1.6.0_12; Java HotSpot(TM) Client VM 11.2-b01
- setting compatibility mode for netbeans.exe to WinXP SP2

All to no avail Sad
Back to top
View user's profile Send private message
nightreveller



Joined: 26 Feb 2009
Posts: 6

PostPosted: Sun Mar 01, 2009 4:23 pm    Post subject: Reply with quote

FYI: the problem is caused by the combination of XDebug and Vista and seems at the moment unsolvable.

See the Vista related bugs on the XDebug bugtracker: http://bugs.xdebug.org/search.php?project_id=0&search=vista&sticky_issues=off&sortby=last_updated&dir=DESC&hide_status_id=-2

Hope this will be solved soon, untill then I'll run a VM for development.

Anyway, Netbeans is great up till now. Thanks Radek for looking into this. Keep up the good work!
Back to top
View user's profile Send private message
Filip Zamboj
Posted via mailing list.





PostPosted: Mon Mar 02, 2009 11:35 am    Post subject: Framework Support in Netbeans Reply with quote

Adarsh LR wrote:
Quote:
Hi

I am a PHP Netbeans user who wants to start using PHP frameworks — Zend, symfony, and CakePHP.
Are there any tutorials in Netbeans while building and extending a sample application in each of the three frameworks

Regards
Adarsh LR


Check out the all-new Messenger 9.0! Go to http://in.messenger.yahoo.com/






Hi Adarsh.

Unfortunately, there are no tutorials at the moment but we are working
on it. Netbeans releases are tested with frameworks. So tutorials will
be done in short time. What about symfony in particular, there is a very
nice tutorial for symfony right in the symfony distribution. So you can
use symfony and Netbeans using all advantages of both. In case you have
any problem with frameworks, com back to this forum, please.

Thanks a lot.
Regards,

--

Issuezilla HowTo: http://www.netbeans.org/community/issues.html
-------------
Filip Zamboj
Sun Microsystems
Back to top
Jeff Rubinoff
Posted via mailing list.





PostPosted: Mon Mar 02, 2009 1:08 pm    Post subject: Framework Support in Netbeans Reply with quote

Adarsh,
There are also some good articles on using NetBeans PHP editor with
frameworks on the PHP team's blog, http://blogs.sun.com/netbeansphp/

Jeff

Filip Zamboj wrote:

Quote:
Adarsh LR wrote:

Quote:
Hi

I am a PHP Netbeans user who wants to start using PHP frameworks —
Zend, symfony, and CakePHP.
Are there any tutorials in Netbeans while building and extending a
sample application in each of the three frameworks

Regards
Adarsh LR


Check out the all-new Messenger 9.0! Go to
http://in.messenger.yahoo.com/







Hi Adarsh.

Unfortunately, there are no tutorials at the moment but we are working
on it. Netbeans releases are tested with frameworks. So tutorials will
be done in short time. What about symfony in particular, there is a
very nice tutorial for symfony right in the symfony distribution. So
you can use symfony and Netbeans using all advantages of both. In case
you have any problem with frameworks, com back to this forum, please.

Thanks a lot.
Regards,

Back to top
LeonB



Joined: 04 Aug 2009
Posts: 1

PostPosted: Tue Aug 04, 2009 10:20 am    Post subject: same problem here Reply with quote

I've got the same problem but on Ubuntu 8.04
If I set a breakpoint it gets ignored. But a xdebug_break() works.

Here's the log from a session with one breakpoint (and don't stop at the first line):
Code:

Log opened at 2009-08-04 10:15:54
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/leon/Workspaces/praktijkweb/Master/index.php" language="PHP" protocol_version="1.0" appid="20730" idekey="netbeans-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>

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

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

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

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

<- breakpoint_set -i 684 -t line -s enabled -f file:///home/leon/Workspaces/praktijkweb/Master/index.php -n 46
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="684" state="enabled" id="207300001"></response>

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

Log closed at 2009-08-04 10:15:57
Back to top
View user's profile Send private message
radek matous
Posted via mailing list.





PostPosted: Tue Aug 04, 2009 5:40 pm    Post subject: Xdebug doesn't stop at breakpoints Reply with quote

LeonB wrote:
Quote:
I've got the same problem but on Ubuntu 8.04

If I set a breakpoint it gets ignored. But a xdebug_break() works.



Here's the log from a session with one breakpoint (and don't stop at the first line):


Breakpoint seems to be properly set from IDE:
<- breakpoint_set -i 684 -t line -s enabled -f
file:///home/leon/Workspaces/praktijkweb/Master/index.php -n 46

and after next command from IDE:
<- run -i 685

comes response:
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run"
transaction_id="685" status="stopping" reason="ok"></response>

instead should come response with status="break" from xdebug

So, either bug in xdebug or your code on line -n 46 isn't executed
because e.g. some condition

You can try to send me your project or index.php file if you wish
Radek








Quote:
Code:


Log opened at 2009-08-04 10:15:54

-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/leon/Workspaces/praktijkweb/Master/index.php" language="PHP" protocol_version="1.0" appid="20730" idekey="netbeans-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>



<- feature_set -i 680 -n show_hidden -v 1

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



<- feature_set -i 681 -n max_depth -v 3

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="681" feature="max_depth" success="1"></response>



<- feature_set -i 682 -n max_children -v 31

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="682" feature="max_children" success="1"></response>



<- feature_get -i 683 -n max_data

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



<- breakpoint_set -i 684 -t line -s enabled -f file:///home/leon/Workspaces/praktijkweb/Master/index.php -n 46

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="684" state="enabled" id="207300001"></response>



<- run -i 685

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



Log closed at 2009-08-04 10:15:57












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 can attach files in this forum
You can download files in this forum


Powered by phpBB