Xdebug path when hitting breakpoint
I'm currently evaluating you software and so far I like what I'm seeing.
But I wouldn't be posting in the support forums if I found something nagging me...
When I debug my project using Xdebug on a remote linux server it tries to hit a breakpoint, but it can't because somehow vs.php doesn't understand which file to open.
Here's my situation:
-Breakpoint set on a file located at libs/blocks/Foobar.class.php on line ##
-Xdebug responds with the correct file and the correct line nr. I can see from the xdebug log
-vs.php doesn't show me the file and thus the browser loads the page just like it wasn't debugged at all
As a workaround I decided to use step over and step into and noticed something strange. While stepping I eventually managed to get to the correct file being libs/blocks/Foobar.class.php on line ##. The difference is that now my file has been opened twice in vs.php, my own "open action" from the solution explorer being "Y:\var\www\libs\blocks\Foobar.class.php" and the "open action" through xdebug being "Y:\var\www\libs/blocks/Foobar.class.php"
Note the subtle difference in / and \ usage
Only breakpoints inserted in the xdebug opened file triggers xdebug to work correct. breakpoints in the normal file are just ignored completely.
Of course files which reside in the root of my webfolder do work because the last trailing slash in the root directory is of the correct format. So only subdirectories cause an issue
I’ve been testing vs.php latest stable build and the latest beta build for VS 2005, but both produce the same problem. The latest beta gave me another problem too btw, all capitals from filenames were lost in the solution explorer, but I gather that’s another story


So you are using a network
So you are using a network share to access your files in Linux, right?
Could you check the debug output for any messages?
Also, a work around is to use the remote project server and access the files via ftp or ssh.
Yes It's a network share
Yes It's a network share through samba.
I checked the debug messages and it does send the breakpoints as I pointed out in my previous post. But vs.php doesn't open the file.
Only when I use debugging with step-into it does open the files which are included in the subdirectories, but as mentioned before; the files are opened twice. Once with the normal windows path separator \ and the other with the subfolders being separated with the / from linux.
For me such a workaround isn't really the solution, I can't imagine this being a major bug...
Test case
I've put a Test case project online for reference, located here.
If you look at the project you see two .php files, one of them is in the 'includes' directory. Now whenever I put a breakpoint on that file: 'lib.php' vs.php doesn't stop at the breakpoint.
I've also put up two logfiles with output from xdebug. The first is the result from only one breakpoint in the 'lib.php' file.
log.txt
The second is when I set the breakpoint in 'index.php' on the line calling the function in 'lib.php'. Then using step into to get to the 'lib.php' file. This time vs.php does open the file 'lib.php' but with the wrong source path (Linux style paths / instead of Windows style \)
log2.txt
My server runs an up to date version of Gentoo Linux, but I figure it doesn't matter which version of Linux is used.
I think the only problem is the parsing of the breakpoint filenames received from xdebug in a Linux environment.
Do you get any error message
Do you get any error message in the Visual Studio debug output window?
I'm afraid
I'm afraid not
**********************************************************************Start debug session 1
----------------------------------------------------------------------
barfey
----------------------------------------------------------------------
The thread 0x1 has exited with code 0 (0x0).
**********************************************************************
Is weird that in the second
Is weird that in the second run (log2.txt) there is no breakpoint set.
What do you mean exactly?
What do you mean exactly? Both files contain the "breakpoint_set" to the line 8 from lib.php.
Are these the two logs we
Are these the two logs we are talking about?
http://hosting.upexia.nl/vsphp/log.txt
http://hosting.upexia.nl/vsphp/log2.txt
Yes, Both contain the
Yes,
Both contain the following line:
<- breakpoint_set -i 8 -t line -f file:///var/data/www/dev.upexia.nl/htdocs/test/vsphp/PHP%20Project/inclu... -n 12 -r 0-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="8" id="280110004"></response>