Unable to stop on remote project php breakpoint with VSPHP 2.4 for VS2008
I have bought VS.Php 2.4 for Visual Studio. Nice product, but I am unable to stop on remote project php breakpoint, but javascript breakpoint is working.
My configuration is :
IDE :
Window Vista Professional running Visual Studio 2008 V9.0.21022.8RTM
Internet Explorer 7.0.6000.16609
VS.Php 2.4 for Visual Studio 2008 version 2,4,3,4467. (registered)
SERVER :
Windows 2000 Pro SP4,
IIS 5.0
PHP Version 5.2.1
xdebug 2.0.2
The configuration seems to work, because, for instance, trying to debug following remote php test file :
<?php
function A() {
B();
}
function B(){
echo 12/0;
}
A();
?>I obtain following result html table result in the browser.
( ! ) Warning: Division by zero in C:\Inetpub\wwwroot\PHPtry\Essai\trunk\index3.php on line 6
Call Stack
# Time Memory Function Location
1 0.0807 59504 {main}( ) ..\index3.php:0
2 0.0961 60072 A( ) ..\index3.php:9
3 0.0962 60120 B( ) ..\index3.php:3
But I am not able to stop on a breakpoint or an xdebug_break function call.
For instance, trying on following remote php test file :
<?php
function A() {
B(); <--- breakpoint in VS 2008
}
function B(){
echo ("hello");
}
xdebug_break( );
A();
?>I obtain following results :
* any breakpoint stop in VS 2008; the breakpoint display a warning icon and tooltiptext is "At index3.php, line3('A',line 2) The breakpoint will not currently be hit. Unbound breakpoint.
* internet explorer opens and display hello.
* the xdebug remote log obtained is following (<...> tags replaced by {...} for html display purpose) :
Log opened at 2008-03-14 10:01:28
-> {init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/Inetpub/wwwroot/PHPtry/Essai/trunk/index3.php" language="PHP" protocol_version="1.0" appid="1608" idekey="5"}{engine version="2.0.2"}{![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="16080001"}{/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="16080002"}{/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="16080003"}{/response}
<- breakpoint_set -i 8 -t line -f file:///EssaiTrunkP1200IIS/index3.php -n 3 -r 0
-> {response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="8" id="16080004"}{/response}
<- run -i 9
-> {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:/Inetpub/wwwroot/PHPtry/Essai/trunk/index3.php" lineno="8"}{/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="xdebug_break" level="0" type="file" filename="file:///C:/Inetpub/wwwroot/PHPtry/Essai/trunk/index3.php" lineno="8"}{/stack}{stack where="{main}" level="1" type="file" filename="file:///C:/Inetpub/wwwroot/PHPtry/Essai/trunk/index3.php" lineno="8"}{/stack}{/response}
<- source -i 12 -f file:///C:/Inetpub/wwwroot/PHPtry/Essai/trunk/index3.php
-> {response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="source" transaction_id="12" encoding="base64"}{![CDATA[PD9waHANCmZ1bmN0aW9uIEEoKSB7DQoJQigpOyAgICAgICAgICAgICAgICANCn0NCmZ1bmN0aW9uIEIoKXsNCgllY2hvICgiaGVsbG8iKTsNCn0NCnhkZWJ1Z19icmVhayggKTsNCkEoKTsNCj8+]]}{/response}
<- source -i 13 -f file:///C:/Inetpub/wwwroot/PHPtry/Essai/trunk/index3.php
-> {response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="source" transaction_id="13" encoding="base64"}{![CDATA[PD9waHANCmZ1bmN0aW9uIEEoKSB7DQoJQigpOyAgICAgICAgICAgICAgICANCn0NCmZ1bmN0aW9uIEIoKXsNCgllY2hvICgiaGVsbG8iKTsNCn0NCnhkZWJ1Z19icmVhayggKTsNCkEoKTsNCj8+]]}{/response}
<- run -i 13
-> {stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"}{![CDATA[aGVsbG8=]]}{/stream}
-> {response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="13" status="stopped" reason="ok"}{/response}
<- stop -i 14
* then, clicking VS 2008 stop button to stop the debug session, Visual studio 2008 Output window displays :
**********************************************************************
Start debug session 1
----------------------------------------------------------------------
Fail to map "/C:/Inetpub/wwwroot/PHPtry/Essai/trunk/index3.php" to a local path
Fail to map "/C:/Inetpub/wwwroot/PHPtry/Essai/trunk/index3.php" to a local path
Fail to map "/C:/Inetpub/wwwroot/PHPtry/Essai/trunk/index3.php" to a local path
Fail to map "/C:/Inetpub/wwwroot/PHPtry/Essai/trunk/index3.php" to a local path
hello
----------------------------------------------------------------------
The thread 0x1 has exited with code 0 (0x0).
**********************************************************************
The program '[6028] vsphp_dbg.exe: Php' has exited with code 0 (0x0).
The program '[2524] iexplore.exe: Script program' has exited with code 0 (0x0).
What may be wrong ?
Thanks for your help.


The log is very useful. A
The log is very useful. A couple of customers have been experiencing issues with IIS and remote debudding.
I see a problem in this line:
breakpoint_set -i 8 -t line -f file:///EssaiTrunkP1200IIS/index3.php -n 3 -r 0
The init message is giving VS.Php the right root directory for proper mapping. But somehow the path is getting messed up.
I'll keep you posted on what I find.
Thanks
For your information
If you think this may be a problem, for your information :
"EssaiTrunkP1200IIS" is the IIS Virtual Directory name of "C:/Inetpub/wwwroot/PHPtry/Essai/trunk" physical directory for FTP declaration.
If it can help you, this is the associated phpproj file :
"General"
{
"ProjectIdGuid" = "{5DD01882-5A4E-4A48-99AE-3EF0C182580F}"
"ProjectVersion" = "2.4.3.4467"
}
"RemoteServer"
{
"RemoteProtocol" = "Ftp"
"RemoteServerName" = "P1200"
"RemotePort" = "0"
"RemoteDirectory" = "/EssaiTrunkP1200IIS/"
"RemoteOptions" = ""
"RemoteRootUrl" = "http://P1200/EssaiTrunkP1200IIS"
}
"Configurations"
{
"Remote|PHP 5"
{
"IncludeDirs" = ""
}
}
"Files"
{
}
"ProjStartupServices"
{
}
"Globals"
{
}
"References"
{
"PhpReference" = "bcmath"
"PhpReference" = "calendar"
"PhpReference" = "com_dotnet"
"PhpReference" = "ctype"
"PhpReference" = "date"
"PhpReference" = "dom"
"PhpReference" = "filter"
"PhpReference" = "ftp"
"PhpReference" = "hash"
"PhpReference" = "iconv"
"PhpReference" = "ISAPI"
"PhpReference" = "java"
"PhpReference" = "json"
"PhpReference" = "libxml"
"PhpReference" = "mbstring"
"PhpReference" = "mcrypt"
"PhpReference" = "mssql"
"PhpReference" = "mysql"
"PhpReference" = "odbc"
"PhpReference" = "pcre"
"PhpReference" = "Reflection"
"PhpReference" = "session"
"PhpReference" = "SimpleXML"
"PhpReference" = "SPL"
"PhpReference" = "standard"
"PhpReference" = "tokenizer"
"PhpReference" = "wddx"
"PhpReference" = "xdebug"
"PhpReference" = "xml"
"PhpReference" = "xmlreader"
"PhpReference" = "xmlwriter"
"PhpReference" = "zlib"
}
Thanks for your reply.
Now I know what the problem
Now I know what the problem is!!!
We were setting the remote directory to the path from the remote server, in this case /EssaiTrunkP1200IIS instead of using the path that XDebug is giving us.
I'll put a fix and have it available in the next build.
You can monitor dev builds here:
http://www.jcxsoftware.com/jcx/vsphp/beta
If you are a customer, let me know via email so I can give you access to:
http://www.jcxsoftware.com/jcx/vsphp-dev
Which has access to history builds as well and detailed information about the build changeslog.
There is still a build still
There is a build still going. After this one finishes I'll start a new build with the fix.
I created a setup similar to yours and with the new fix, VS.Php was able to map the remote files and stop at the breakpoints.
Thanks!
Thank you for quick reply and solution
Yes I am customer and interrested to be able to access http://www.jcxsoftware.com/jcx/vsphp-dev. It seems that I can already access to this url.
I have received your email. Thanks you very much for it and for very quick replies and build solution.
I have just dowloaded development build 2.4.4.4494.
The problem is solved !!
I just tried remote debugging of above examples with IIS 5.0, then Apache TomCat 6.0.10 server running under Windows 2000 pro SP4. Breakpoint set in VS2008 with VS.Php 2.4 on line 3 is working now, and step by step also !!!
Thanks you very much !!!