xDebug not hitting breakpoints on local VS 2008
This is a bizarre issue. If I leave the default new project name to "PHP Project1" my breakpoint is hit, but if I change that name, the breakpoint is never hit.
I recently moved from my VS 2005/VS.php version to VS 2008/VS.php version 2008_2.4.4.4494. I installed VS 2008 and VS.php for 2008 with default settings and recent updates.
I created a blank new php project. I called the new project "myProject". I added a new page titled "index.php". On that page, I added the code "echo 'test';" and nothing else. I then added a breakpoint next to it. I then go to project properties and change the Platform to PHP 5 and made sure the XDebug is selected. I then set that index.php as the start page. I run the debugger, everything started fine, "Test" is printed to the screen but my break point is never hit.
Now here is the bizzare issue. I do the same steps as above, but I leave the default project name as "PHP Project1", I create the index page the same way, set the same properties, debug and this time the breakpoint IS hit.
I found out that I can use any number I want when naming the project, just as long as it says "PHP Project" and the breakpoint will be hit. I tried creating new projects with all kinds of project names such as "PHP", "Project", etc but the debugger never hits any of my breakpoints.
I been trying to figure out this issue for a while now and have no more ideas. Please help!
I am running on:
Windows Vista Business w/ SP1
Duo Core E4400 2.00 Ghz / 2GB RAM
I am using VS.php built in apache and debugger on my local machine.
~Josh


This is really odd. I tried
This is really odd. I tried myself and it worked fine for me. Could you send me a zip file with the project you are using to support at jcxsoftware dot com?
BTW, check the debug output window for any error messages on why is not stopping on your breakpoints.
Another thing is to enable xdebug logging, that could also shed some light.
Yet another user with this problem
This problem began with 4467. I am running 2005. All was well until I installed that version. Just loaded 4494 but no help. It seems to know the breakpoints are there, as they appear in the bound and unbound state as modules execute. But it will not stop.
This new version will not check for updates when I request it, and it will not bring up the purchase or activation screens. Debug output shows nothing other than the generated html and the entry and exit banners. There are no errors reported. Once I figure out how to enable logging I will give you that report.
xdebug
Ok - here is your xdebug file - no thanks to your doc or your forum. Since this has stopped me in the middle of something (my bad for loading the update) I am hoping that you guys will actually answer soon. This is my entire php file:
<?php$a = "bingo";
$b = 1;
$c = 3;
$d = 4; /* TODO: Add code here */
?>
Pretty simple. I set a breakpoint on any line and run the thing. It ignores the breakpoint and produces the following xdebug information. Incidentally, if xdebug.txt does not exist it crashes. Just another problem. I don't see how to provide you a file so here it is. Hope to hear something soon:
Log opened at 2008-04-08 18:46:51-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/CONTRACT/MTA/Engine/Engine/index1.php" language="PHP" protocol_version="1.0" appid="5720" idekey="11"><engine version="2.0.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2007 by Derick Rethans]]></copyright></init>
<- feature_get -i transaction_id -n supports_async
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="transaction_id" feature_name="supports_async" supported="1"><![CDATA[0]]></response>
<- feature_get -i transaction_id -n notify_ok
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="transaction_id" feature_name="notify_ok" supported="0"><![CDATA[0]]></response>
<- stdout -i 3 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stdout" transaction_id="3" success="1"></response>
<- stderr -i 4 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stderr" transaction_id="4" success="0"></response>
<- breakpoint_set -t exception -x "Fatal error" -i 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5" id="57200001"></response>
<- breakpoint_set -t exception -x "Parse error" -i 6
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id="57200002"></response>
<- breakpoint_set -t exception -x "Unknown error" -i 7
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" id="57200003"></response>
<- breakpoint_set -i 8 -t line -f file://C:/CONTRACT/MTA/Engine/Engine/global_login.php -n 7 -r 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="8" id="57200004"></response>
<- breakpoint_set -i 9 -t line -f file://C:/CONTRACT/MTA/Engine/Engine/index1.php -n 3 -r 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="9" id="57200005"></response>
<- run -i 10
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="10" status="break" reason="ok"><xdebug:message filename="file:///C:/CONTRACT/MTA/Engine/Engine/index1.php" lineno="3"></xdebug:message></response>
<- stack_get -i 11
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="11"><stack where="{main}" level="0" type="file" filename="file:///C:/CONTRACT/MTA/Engine/Engine/index1.php" lineno="3"></stack></response>
<- run -i 12
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="12" status="stopped" reason="ok"></response>
<- stop -i 13
It seems the problem could
It seems the problem could be with an extra slash on the file url.
We are using:
file://C:/CONTRACT/MTA/Engine/Engine/index1.php
But then it breaks on:
file:///C:/CONTRACT/MTA/Engine/Engine/index1.php
Let me look into this a bit more.
Thanks
I checked on the code and it
I checked on the code and it does not seem to like file:/// for windows paths.
I wonder why in my system I always get // instead of ///. I'll ask the XDebug guys.
Could you please post the
Could you please post the content of the debug output window? There should be a message saying fail to map file for breakpoint.
Sorry for the delay
I worked around this and just now checked back. I can no longer use xdebug without a crash. This is the result in the output window. DBG seems to work.
**********************************************************************
Start debug session 1
----------------------------------------------------------------------
The program '[5308] vsphp_dbg.exe: Php' has exited with code 0 (0x0).
Same problem...
Hi,
same problem here.
I can not hit any breakpoints when i try debugging with xdebug unless i leave the default projektname when creating a new project.
In VS2005 everything worked fine.
Also with DBG everything seems to work in VS2008.
Any hints how i can get xDebug to work with VS2008?
Thanks for your help.
Matthias
Could you enable remote_log
Could you enable remote_log in xdebug and post the log here?
Yes, of course: Log opened
Yes, of course:
Log opened at 2008-04-21 05:56:31-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/xampp/htdocs/vsphptest/vsphptest/index.php" language="PHP" protocol_version="1.0" appid="976" idekey="5"><engine version="2.0.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2007 by Derick Rethans]]></copyright></init>
<- feature_get -i transaction_id -n supports_async
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="transaction_id" feature_name="supports_async" supported="1"><![CDATA[0]]></response>
<- feature_get -i transaction_id -n notify_ok
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="transaction_id" feature_name="notify_ok" supported="0"><![CDATA[0]]></response>
<- stdout -i 3 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stdout" transaction_id="3" success="1"></response>
<- stderr -i 4 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stderr" transaction_id="4" success="0"></response>
<- breakpoint_set -t exception -x "Fatal error" -i 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5" id="9760001"></response>
<- breakpoint_set -t exception -x "Parse error" -i 6
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id="9760002"></response>
<- breakpoint_set -t exception -x "Unknown error" -i 7
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" id="9760003"></response>
<- breakpoint_set -i 8 -t line -f file://C:/xampp/htdocs/vsphptest/vsphptest/index.php -n 7 -r 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="8" id="9760004"></response>
<- run -i 9
-> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[SmV0enQgZ2VodHMgbG9z]]></stream>
-> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[V2FydW0gZnVua3Rpb25pZXJ0IGRlciBzY2hlad8gYmxhIG5ldD8=]]></stream>
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="9" status="break" reason="ok"><xdebug:message filename="file:///C:/xampp/htdocs/vsphptest/vsphptest/index.php" lineno="7"></xdebug:message></response>
<- stack_get -i 10
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="10"><stack where="{main}" level="0" type="file" filename="file:///C:/xampp/htdocs/vsphptest/vsphptest/index.php" lineno="7"></stack></response>
<- run -i 11
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="11" status="stopped" reason="ok"></response>
<- stop -i 12
Hope this helps!
Thanks and greets
Matthias
Could you give it a try to
Could you give it a try to the latest 2.5 build:
http://www.jcxsoftware.com/jcx/vsphp/beta
And let me know if that solves the problem for you.
No, it doesn't work. I've
No, it doesn't work. I've tried the beta build already.
What else could be the problem?
Do you see a message in the
Do you see a message in the debug output window about failing to map a file?
No, i'm sorry. This is what
No, i'm sorry.
This is what happens al the time when i'm trying to debug with xDebug and a project is called other than PHP Project:
http://img410.imageshack.us/my.php?image=screenshot16visualstudiqv9.jpg
This is very sad, because we are interested in buying your software for developing.
We have succesfully used your software on VS2005 but now we are moving completely to VS2008 and therefore it is absolutely neccesery for us to get sure everthing is working fine before buying some software.
Please let me know if i can help you to find a solution to get it back working or if you have any more suggestions.
Thank you again!
Greetings
Matthias
Matthias we are working out
Matthias we are working out the issue with XDebug. In the meantime you can use DBG.
Thanks for your patience on this,
Thanks for your help! Can
Thanks for your help!
Can you reproduce this issue?
Greets
I don't know if it is the
I don't know if it is the same issue but we fixed a number of issues.
Try this:
http://www.jcxsoftware.com/jcx/vsphp/beta
If you still experience the crash, I'd like to work with you in getting a memory dump. This process has a debugger attached to it so getting a memory dump is not trivial because you have to use the remote debugger (msvsmon) and attach that way. If you aren't familiar with msvsmon I can help you do this.
Thanks
Hi guys, sorry for delay,
Hi guys,
sorry for delay, but i had some very busy days.
So, i tried your newest beta as you suggested and what should i say?
It seems to work now :-)
I'll test it more the next days and give you guys a feedback in a few days!
Thanks for your help again.
Happy for now!
Greets
Matthias
P.S.: There's is something more i want to point at:
On the "new project from existing folder" dialog there is the following box:
http://img140.imageshack.us/my.php?image=screenshot17newprojectfxp7.jpg
It asks for which folders should be ignored from the project.
But for ignoring folders from project you have to disable all checkboxes, not as expected leave them marked.
It's just a little thing but it can be very confusing for a moment.