Home » Language IDEs » PHP Development Tools (PDT) » PHP Debug - No break at breakpoint !
PHP Debug - No break at breakpoint ! [message #94407] |
Sat, 21 February 2009 15:53  |
Eclipse User |
|
|
|
Hi,
I am newbie in using Eclipse PDT and I am impressed by its potentiality.
But it doesn't work all right on my pc.
- I installed Eclipse PDT 2.0, wamp 2.0. I configured Xdebug as it is
described here: http://robsnotebook.com/php_debugger_pdt_xdebug. I have
confirmation with phpinfo() Xdebug installed.
- I configured PHP debug on Eclipse.
- I create a small PHP Project with one file with echo "Hello Wolrd !" and
put a breakpoint on this line
- I run Debug PHP Web Page and there is no way to stop on the Breakpoint
I don't where I done wrong ? In xdebug configuration, in PHP debug
configuration, Eclispe, wamp ?
I would be very happy if I join help. I didn't find anything in mailing
list.
Thanks a lot.
|
|
|
Re: PHP Debug - No break at breakpoint ! [message #94436 is a reply to message #94407] |
Sat, 21 February 2009 19:51   |
Eclipse User |
|
|
|
Originally posted by: dkel50.hotnospmail.com
ensure you don't have xdebug listed as a pure extension, ie
extension=xdebug.dll
check that you only have it installed as a zend_extension. For more info
check http://www.xdebug.org and specifically the FAQ, ie
http://www.xdebug.org/docs/faq
and the section about "Q: I'm using XAMPP, but I can't seem to get the
packaged xdebug extension to work properly."
Also check the documentation page where there is a document about how to
use PDT with Xdebug, link is
http://www.eclipse.org/pdt/documents/XDebugGuideForPDT2.0.pd f
Christophe Sicard wrote:
> Hi,
>
> I am newbie in using Eclipse PDT and I am impressed by its potentiality.
> But it doesn't work all right on my pc.
> - I installed Eclipse PDT 2.0, wamp 2.0. I configured Xdebug as it is
> described here: http://robsnotebook.com/php_debugger_pdt_xdebug. I have
> confirmation with phpinfo() Xdebug installed.
> - I configured PHP debug on Eclipse.
> - I create a small PHP Project with one file with echo "Hello Wolrd !"
> and put a breakpoint on this line
> - I run Debug PHP Web Page and there is no way to stop on the Breakpoint
>
> I don't where I done wrong ? In xdebug configuration, in PHP debug
> configuration, Eclispe, wamp ?
>
> I would be very happy if I join help. I didn't find anything in mailing
> list.
>
> Thanks a lot.
>
|
|
| | |
Re: PHP Debug - No break at breakpoint ! [message #488383 is a reply to message #94407] |
Mon, 28 September 2009 09:44   |
Eclipse User |
|
|
|
Hi,
I figured I'd try posting in here first instead of creating my own thread.
I'm having a similar problem with Eclipse's PHP specific project, and Xdebug.
Breakpoints will not fire, also I am unable to step through code, with or without the "break at first line" check box checked.
I have tested Eclipse on Windows 7, Linux Mint 7 Gloria, and the latest LTS Ubuntu, they all have the same problem.
PHP loads the Xdebug extention as it appears with phpinfo().
I can start a debug as PHP Web Page and when I end the session the browser states that the Debug session has ended, so as far as I can tell XDebug is actually running and doesn't crash through my script.
I checked and the extension is loaded with zend_extension and configured as per http://www.eclipse.org/pdt/documents/XDebugGuideForPDT2.0.pd f , with no luck.
I have tried this with Apache, XAMPP's Apache, and IIS with the same result, I am unable to step through code, and it is not stopping on any breakpoint in my code.
I have verified that it the code is executing where the break points are by using print statements before and after the breakpoint.
I have tried different Java versions, 6u13, 6u14, 6u15, 6u16, no effect, same problem.
To be a little more specific about my setup:
Currently running Windows 7 with IIS, Eclipse for PHP Developers build 20090920-1017, Java 6u13 with both JRE and JDK installed.
Eclipse Project root is E:\Project
Web Server document root is E:\Project\public
Debug File Start is E:\Project\public\index.php
Debug URL is http://localhost/index.php
E: is an external drive partitioned with VFAT32 as a 50GB partition.
If anyone has -any- ideas I'd greatly appreciate it. At this point I'm switching to another editor in order to proceed with my work, but I would very much like to get Eclipse working so I can continue to use it.
Thanks,
|
|
|
Re: PHP Debug - No break at breakpoint ! [message #488437 is a reply to message #488383] |
Mon, 28 September 2009 12:26   |
Eclipse User |
|
|
|
Originally posted by: dkel50.hotremovemail.com
In your php.ini add the following so that xdebug generates a log
xdebug.remote_log = /tmp/xdebug.log and restart your server.
More info on xdebug configuration can be found at http://www.xdebug.org
specifically see http://www.xdebug.org/docs/faq to see if any of these
issues apply to you as well.
Try and debug a web page with PDT with the log setting in place. If
xdebug is loaded then you should get something appearing in this log
showing it attempting to communicate with PDT and if comms are working
then PDT will send commands to xdebug to drive its actions. If there is
no log then it could be the xdebug just cannot connect to your PDT
system. Check that both are using the same port (eg 9000) and that your
PDT system is actually listening on that port. Ensure that there are no
firewalls blocking port 9000 on either the server or your PDT system.
If this is all ok and you get a log then If you could append the results
of this log from a test debug I may be able to spot the problem straight
away.
Dave Kelsey
On 28/09/09 14:44, cryo26@gmail.com wrote:
> Hi,
>
> I figured I'd try posting in here first instead of creating my own thread.
>
> I'm having a similar problem with Eclipse's PHP specific project, and
> Xdebug.
>
> Breakpoints will not fire, also I am unable to step through code, with
> or without the "break at first line" check box checked.
>
> I have tested Eclipse on Windows 7, Linux Mint 7 Gloria, and the latest
> LTS Ubuntu, they all have the same problem.
>
> PHP loads the Xdebug extention as it appears with phpinfo().
>
> I can start a debug as PHP Web Page and when I end the session the
> browser states that the Debug session has ended, so as far as I can tell
> XDebug is actually running and doesn't crash through my script.
>
> I checked and the extension is loaded with zend_extension and configured
> as per http://www.eclipse.org/pdt/documents/XDebugGuideForPDT2.0.pd f ,
> with no luck.
>
> I have tried this with Apache, XAMPP's Apache, and IIS with the same
> result, I am unable to step through code, and it is not stopping on any
> breakpoint in my code.
>
> I have verified that it the code is executing where the break points are
> by using print statements before and after the breakpoint.
>
> I have tried different Java versions, 6u13, 6u14, 6u15, 6u16, no effect,
> same problem.
>
> To be a little more specific about my setup:
>
> Currently running Windows 7 with IIS, Eclipse for PHP Developers build
> 20090920-1017, Java 6u13 with both JRE and JDK installed.
>
> Eclipse Project root is E:\Project
> Web Server document root is E:\Project\public
> Debug File Start is E:\Project\public\index.php
> Debug URL is http://localhost/index.php
>
> E: is an external drive partitioned with VFAT32 as a 50GB partition.
>
> If anyone has -any- ideas I'd greatly appreciate it. At this point I'm
> switching to another editor in order to proceed with my work, but I
> would very much like to get Eclipse working so I can continue to use it.
>
> Thanks,
|
|
| |
Re: PHP Debug - No break at breakpoint ! [message #488562 is a reply to message #488448] |
Tue, 29 September 2009 05:13   |
Eclipse User |
|
|
|
Originally posted by: dkel50.hotremovemail.com
path mapping is the ability to associate a fully qualified file on one
machine with an equivalent file within your workspace. URLs as part of a
path mapping are not going to work.
with the xdebug implementation, if your web server is using the same
files as PDT (ie they are pointing to the same physical file, not links)
then no path mapping will be required as xdebug will provide the fully
qualified file and PDT can locate it within the project.
Alternatively PDT will attempt to work out the path mapping based on the
name of the file you specified in the web launch and the name of the php
file that first gets invoked when the URL in the web launch is invoked.
If all else fails then you need to define the path mapping yourself but
the server path must be a real file path, not a URL.
The xdebug guide should provide more information on how path mapping
works, but looking at your setup your current path mapping is probably
not valid.
Even if pathmapping wasn't working, if you have break on first line set,
then it should have suspended execution and if you couldn't find a file
you would have received a message, which makes me think there was a
different problem and you have fixed it.
Dave Kelsey
On 28/09/09 18:10, cryo26@gmail.com wrote:
> Actually I think I just figured something out.
>
> Apparently if I set the webserver document root to the same as the
> project root, and allow eclipse to autogenerate the url to
> "http://localhost/public/index.php" everything runs fine.
>
> As in:
>
> Document root : E:\Project
> Project root : E:\Project
> Web url: http://localhost/public/index.php
>
> That got me thinking, so I set the document root back to:
>
> Document Root E:\Project\public
> and I went into the Eclipse preferences:
>
> Preferences -> PHP -> PHP Servers
>
> And configured my PHP Server's Path Mappings with :
>
> Path To Server: http://localhost/index.php
> Path in Workspace /Project/public
>
> And it all works just fine now.
>
> I guess the debugger couldn't find the file to debug for some reason?
>
> I'm not sure why it would matter if I specified a different URL path to
> launch on debug than where the file sits in my project in relation to
> the document root.
>
> But apparently if your document root is not the same as your project
> root, you have to hard code a path mapping of a URL to a path in the
> workspace.
>
> Is this the way the debugger is supposed to work or is this a bug?
|
|
| | | | |
Re: PHP Debug - No break at breakpoint ! [message #488659 is a reply to message #488636] |
Tue, 29 September 2009 12:03  |
Eclipse User |
|
|
|
Originally posted by: dkel50.hotremovemail.com
The log looks fine. Being on a different drive should not have been a
problem. I still think it was something else, ie not even getting as far
as establishing communication because break on first line will do
something even if it cannot locate the correct file for setting breakpoints.
Dave Kelsey
On 29/09/09 15:32, cryo26@gmail.com wrote:
> Yes I forgot to remove the path mapping. Once I did it seems to be
> running fine again.
>
> But I'm a bit confused. I added the path mapping previously because with
> this same configuration it was not running properly.
>
> The only difference would be in the location of the files. Previously
> the files were located on an external USB drive assigned to the drive
> letter E:.
>
> Could that have caused a problem with the debugger?
>
>
> Also here's the log after I removed the path and it seems to be working.
>
>
> -> <init xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
> fileuri="file:///C:/Code/Taktix/public/index.php" language="PHP"
> protocol_version="1.0" appid="1580" idekey="ECLIPSE_DBGP"><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 11 -n show_hidden -v 1
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set"
> transaction_id="11" feature="show_hidden" success="1"></response>
>
> <- feature_set -i 12 -n max_depth -v 3
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set"
> transaction_id="12" feature="max_depth" success="1"></response>
>
> <- feature_set -i 13 -n max_children -v 31
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set"
> transaction_id="13" feature="max_children" success="1"></response>
>
> <- feature_get -i 14 -n encoding
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get"
> transaction_id="14" feature_name="encoding"
> supported="1"><![CDATA[iso-8859-1]]></response>
>
> <- feature_get -i 15 -n supports_async
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get"
> transaction_id="15" feature_name="supports_async"
> supported="1"><![CDATA[0]]></response>
>
> <- stdout -i 16 -c 1
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stdout"
> transaction_id="16" success="1"></response>
>
> <- stderr -i 17 -c 1
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stderr"
> transaction_id="17" success="0"></response>
>
> <- breakpoint_set -i 18 -t line -f
> file:///C:%5CCode%5CTaktix%5Cpublic%5Cindex.php -n 6
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set"
> transaction_id="18" id="15800001"></response>
>
> <- breakpoint_set -i 19 -t line -f
> file:///C:%5CCode%5CTaktix%5Cpublic%5Cindex.php -n 5
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set"
> transaction_id="19" id="15800002"></response>
>
> <- breakpoint_set -i 20 -t line -f
> file:///C:%5CCode%5CTaktix%5Cpublic%5Cindex.php -n 4
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set"
> transaction_id="20" id="15800003"></response>
>
> <- run -i 21
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run"
> transaction_id="21" status="break" reason="ok"><xdebug:message
> filename="file:///C:/Code/Taktix/public/index.php"
> lineno="4"></xdebug:message></response>
>
> <- stack_get -i 22
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get"
> transaction_id="22"><stack where="{main}" level="0" type="file"
> filename="file:///C:/Code/Taktix/public/index.php"
> lineno="4"></stack></response>
>
> <- stack_get -i 23
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get"
> transaction_id="23"><stack where="{main}" level="0" type="file"
> filename="file:///C:/Code/Taktix/public/index.php"
> lineno="4"></stack></response>
>
> <- run -i 24
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run"
> transaction_id="24" status="break" reason="ok"><xdebug:message
> filename="file:///C:/Code/Taktix/public/index.php"
> lineno="5"></xdebug:message></response>
>
> <- stack_get -i 25
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get"
> transaction_id="25"><stack where="{main}" level="0" type="file"
> filename="file:///C:/Code/Taktix/public/index.php"
> lineno="5"></stack></response>
>
> <- stack_get -i 26
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get"
> transaction_id="26"><stack where="{main}" level="0" type="file"
> filename="file:///C:/Code/Taktix/public/index.php"
> lineno="5"></stack></response>
>
> <- run -i 27
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run"
> transaction_id="27" status="break" reason="ok"><xdebug:message
> filename="file:///C:/Code/Taktix/public/index.php"
> lineno="6"></xdebug:message></response>
>
> <- stack_get -i 28
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get"
> transaction_id="28"><stack where="{main}" level="0" type="file"
> filename="file:///C:/Code/Taktix/public/index.php"
> lineno="6"></stack></response>
>
> <- stack_get -i 29
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get"
> transaction_id="29"><stack where="{main}" level="0" type="file"
> filename="file:///C:/Code/Taktix/public/index.php"
> lineno="6"></stack></response>
>
> <- run -i 30
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[DQo=]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <stream xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout"
> encoding="base64"><![CDATA[]]></stream>
>
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run"
> transaction_id="30" status="stopping" reason="ok"></response>
>
> <- stop -i 31
> -> <response xmlns="urn:debugger_protocol_v1"
> xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop"
> transaction_id="31" status="stopped" reason="ok"></response>
>
>
|
|
|
Goto Forum:
Current Time: Sun May 11 23:39:08 EDT 2025
Powered by FUDForum. Page generated in 0.06800 seconds
|