NetBeans Forums

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

Php debugger ignores breakpoints and doesnt highlight program counter

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



Joined: 14 Aug 2010
Posts: 6

PostPosted: Sat Aug 14, 2010 7:01 pm    Post subject: Php debugger ignores breakpoints and doesnt highlight program counter Reply with quote

I'm having a problem with the debugger in that it doesnt stop at breakpoints and the current execution point is not displayed/highlighted, I can only tell which line is being executed by looking at the call stack. Also the only way to debug a php file is to configure the debugger to stop at the first line and step through the program line by line and its possible to view the value of variables. Additionally in some cases (where I have used a templated file) the debugger seems to step over/ignore certain executable parts for no good reason, even though i'm settping through the code line by line...

As far as I can tell xdebug is configured correctly, I managed to run this test successfully.

Screenshots


I'm running NetBeans IDE 6.9 (Build 201006101454) on Windows 7 Home premium 64 bit.

Using 32 bit java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) Client VM (build 17.0-b16, mixed mode, sharing).

Running Apache 2.2.15 (win 32)

VC6 thread safe build of PHP 5.3.3 (cli) (built: Jul 21 2010 20:28:30)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

php.ini xdebug config:
zend_extension = D:\apps\php\ext\php_xdebug-2.1.0-5.3-vc9.dll
xdebug.remote_log="D:\apps\php\temp\xdebug-errors.log"
xdebug.idekey=netbeans-xdebug
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_mode=req
Back to top
complicity



Joined: 14 Aug 2010
Posts: 6

PostPosted: Sun Aug 15, 2010 12:40 pm    Post subject: Reply with quote

Ok I resolved the issue, it looks like just a case of me being stupid and netbeans being difficult. I hadn't configured the mapping correctly between server path and project path, I had mapped the parent folders instead of the project folder so the original mapping was:

D:\apps\apache\2.2\htdocs --> D:\Users\Setebos\Documents\code\php

I changed this to:

D:\apps\apache\2.2\htdocs\tutorial --> D:\Users\Setebos\Documents\code\php\tutorial

It all works beautifully now, I get the debug programme pointer and all break points are hit correctly. See screenshot
Back to top
radek matous
Posted via mailing list.





PostPosted: Mon Aug 16, 2010 12:03 pm    Post subject: Php debugger ignores breakpoints and doesnt highlight program counter Reply with quote

On 08/15/2010 02:40 PM, complicity wrote:
Quote:
Quote:
Ok I resolved the issue, it looks like just a case of me being stupid and netbeans being difficult. I hadn't configured the mapping correctly between server path and project path, I had mapped the parent folders instead of the project folder so the original mapping was:

D:\apps\apache\2.2\htdocs --> D:\Users\Setebos\Documents\code\php

I changed this to:

D:\apps\apache\2.2\htdocs\tutorial --> D:\Users\Setebos\Documents\code\php\tutorial

It all works beautifully now, I get the debug programme pointer and all break points are hit correctly. See screenshot (http://imgur.com/G1o3z.png)


If mapping [1] doesn't work for you but [2] works then please report it as a bug.
The best would be to use both path mapping [1], [2] again with enabled logging (see [3]) and attach the log output to the issue.

Radek

[1] D:\apps\apache\2.2\htdocs --> D:\Users\Setebos\Documents\code\php
[2] D:\apps\apache\2.2\htdocs\tutorial --> D:\Users\Setebos\Documents\code\php\tutorial
[3] http://wiki.netbeans.org/HowToConfigureXDebug#Enable_NetBeans_PHP_debugger_logging
Back to top
complicity



Joined: 14 Aug 2010
Posts: 6

PostPosted: Wed Aug 18, 2010 1:58 pm    Post subject: Reply with quote

This is quite strange, I have reverted the path mapping and I can't reproduce the bug an longer. I restarted netbeans in case it was being cached but it still works fine. I also tried reverting some of the php.ini changes and restarting apache and it still works Confused . I have been trying lots of different things to get this to work, its possible that it was some other factor that was causing this debugging issue, I'll see if I can reproduce it again.
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
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