[xdebug-general] Re: Some breakpoints work, others don't

From: Derick Rethans <derick[@]xdebug.org>
Date: Sat, 23 Feb 2008 12:24:56 +0100 (CET)

On Fri, 22 Feb 2008, Harkin Banks wrote:

> No, my breakpoints are on lines of code and it's clear that those
> lines are executing. Thank you for the idea, anyhow. I appreciate
> it.
>
> Actually, now that I'm looking at this more, there's something more
> general going on. I have misphrased the problem. It's really that
> sometimes Xdebug works and sometimes it does not -- sometimes no
> connection is made when I would expect it to. So, it is true that in
> some cases my breakpoints aren't honored (even when placed on a line
> that is clearly executed (eg, echo("STUB")), but in those cases I
> think I have reported what the problem is in a misleading way.

echo("STUB") is not a real function call in PHP, it's a language
construct. Sometimes the engine sets the line number for such statements
on the line below. Setting a breakpoint on function calls, and/or using
xdebug_break() can be more reliable.

> I'm baffled by why in some cases Xdebug works (a connection is made
> and I get control) when in others it does not (I get the timeout
> before any connection is made) when in both cases I am viewing the
> same php file which is clearly getting executed in both cases. I
> suspect that I am missing something basic (ie, am doing something
> stupid :) ).

I've had some issues with the VIM plugin as well when I tested it.
However, with an editor like Komodo it has been very reliable for me.

regards,
Derick

-- 
Like Xdebug? Send a postcard: http://derickrethans.nl/xdebug_2_released.php
Xdebug | http://xdebug.org | xdebug-general@lists.xdebug.org
Received on Sat Feb 23 2008 - 12:24:51 GMT

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST