tags:

views:

436

answers:

4

Hi,

I am using xdebug plugin for vim. After making few changes i was able to run debugger but not able to set breakpoints. So, I enabled xdebug.remote_log and below is the log statements corresponding to setting breakpoint.

<- breakpoint_set -i 5 -t line -f file:///C:\htdocs\testLocal.php -n 36 ->

Its issuing request to debugger in proper format only but no idea why debugger is returning "command is not avilable". Please let me know if anything is wrong.

A: 

I spotted an extra "/" in "file:///C:\htdocs\testLocal.php", mayby the vim plugin isn't compatible with windows filepaths?

Bob Fanger
That extra "/" is required to indicate the resource is there on the local machine itself."file:///C:\htdocs\testLocal.php" is equivalent ""file://localhost/C:\htdocs\testLocal.php"I already tried removing that extra "/" but it didn't work.
Naga Kiran
A: 

I recently just installed this same thing and found a tutorial by Blake Johnson all about installing and using Xdebug from within Vim.

Also, try clearing any cookies on the page you might have. This often times would cause the plugin to get screwed up in a strange way.

jW
A: 

Make sure you set breakpoints on lines that contain a php expression, not on blank lines or lines containing just a closing bracket.

Setting breakpoints on blank lines doesn't work, and returns the cryptic 'command not found' error you are getting.

simoncoggins
A: 

I had the same problem. When I checked the xdebug logs, it showed file:///http://myapp.local As you see my ide (PHP eclipse) seems to insert the extra "http://" treating this as a URL instead of a file.

Luckily, this was the case with just my index.php. Other file breakpoints were being communicated correctly to xdebug and I was able to set and hit breakpoints on php expression as long as they didn't know span multiple lines. The latter for some reason would cause breakpoints to not hit and just pass by.

Hope this helps!

php-newbie