Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Watch Expressions Crash Debugger
Watch Expressions Crash Debugger [message #84208] Fri, 21 November 2008 18:11 Go to next message
Mark Dexter is currently offline Mark DexterFriend
Messages: 324
Registered: July 2009
Senior Member
Hi all. I've been using (and learning) the PDT for a few months now
using XDebug. First of all, thanks for making this such a great tool!

One problem I have noticed both with the 1.0 version and now the 2.0.0
M1 2008-10-30 version is that undefined Watch Expressions can sometimes
crash the debug session. For example, I'll be debugging one section of
code with some Watch expressions set up. If I forget to delete all of
these expressions before starting a new debug session in a different
section of the code (where these expressions are not defined), in some
cases it crashes the debug session. (In other cases, it does what I
think it is supposed to do and just shows the Watch expression in red
with an error message.)

My recollection using the Java debugger is that, when watch expressions
are undefined, they just show in red but do not crash the session.

It's not a huge deal, just an inconvenience. But I thought I would
report it. Thanks again. Mark
Re: Watch Expressions Crash Debugger [message #84268 is a reply to message #84208] Fri, 21 November 2008 22:03 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
Hi Mark. In the xdebug implementation at least, in order to evaluate a watch expression, an eval is
done. If you attempt to eval something like a function that is not defined, then php itself
terminates the script as it can put the engine into an undetermined state (this seems to not only
affect undefined functions). So the limitation is php itself rather than xdebug or PDT.

I have discussed this with the xdebug author and there is no real way round this currently. I could
stop watch expressions from being expressions but only watch variables I suppose but some people do
find it useful to do expressions.

You can of course disable expressions but you should only enable them when you know they are valid
(which is a pain). PDT should inform you if a script is unexpectedly terminated due to this scenario.


Regards
Dave Kelsey

Mark Dexter wrote:
> Hi all. I've been using (and learning) the PDT for a few months now
> using XDebug. First of all, thanks for making this such a great tool!
>
> One problem I have noticed both with the 1.0 version and now the 2.0.0
> M1 2008-10-30 version is that undefined Watch Expressions can sometimes
> crash the debug session. For example, I'll be debugging one section of
> code with some Watch expressions set up. If I forget to delete all of
> these expressions before starting a new debug session in a different
> section of the code (where these expressions are not defined), in some
> cases it crashes the debug session. (In other cases, it does what I
> think it is supposed to do and just shows the Watch expression in red
> with an error message.)
>
> My recollection using the Java debugger is that, when watch expressions
> are undefined, they just show in red but do not crash the session.
>
> It's not a huge deal, just an inconvenience. But I thought I would
> report it. Thanks again. Mark
Re: Watch Expressions Crash Debugger [message #84372 is a reply to message #84268] Sat, 22 November 2008 18:41 Go to previous message
Mark Dexter is currently offline Mark DexterFriend
Messages: 324
Registered: July 2009
Senior Member
Dave Kelsey wrote:
> Hi Mark. In the xdebug implementation at least, in order to evaluate a
> watch expression, an eval is done. If you attempt to eval something like
> a function that is not defined, then php itself terminates the script as
> it can put the engine into an undetermined state (this seems to not only
> affect undefined functions). So the limitation is php itself rather than
> xdebug or PDT.
>
> I have discussed this with the xdebug author and there is no real way
> round this currently. I could stop watch expressions from being
> expressions but only watch variables I suppose but some people do find
> it useful to do expressions.
>
> You can of course disable expressions but you should only enable them
> when you know they are valid (which is a pain). PDT should inform you if
> a script is unexpectedly terminated due to this scenario.
>
>
> Regards
> Dave Kelsey
>
> Mark Dexter wrote:
>> Hi all. I've been using (and learning) the PDT for a few months now
>> using XDebug. First of all, thanks for making this such a great tool!
>>
>> One problem I have noticed both with the 1.0 version and now the 2.0.0
>> M1 2008-10-30 version is that undefined Watch Expressions can
>> sometimes crash the debug session. For example, I'll be debugging one
>> section of code with some Watch expressions set up. If I forget to
>> delete all of these expressions before starting a new debug session in
>> a different section of the code (where these expressions are not
>> defined), in some cases it crashes the debug session. (In other cases,
>> it does what I think it is supposed to do and just shows the Watch
>> expression in red with an error message.)
>>
>> My recollection using the Java debugger is that, when watch
>> expressions are undefined, they just show in red but do not crash the
>> session.
>>
>> It's not a huge deal, just an inconvenience. But I thought I would
>> report it. Thanks again. Mark

Hi Dave. Thanks for the explanation. I certainly would NOT want to
remove this capability, since I find Watch Expressions extremely
valuable. This is something that is not a big deal to live with. Thanks
again. Mark
Previous Topic:[Announce] PDT 2.0.0 I200811200931 is available
Next Topic:Named constants in xdebug
Goto Forum:
  


Current Time: Tue Apr 23 17:51:07 GMT 2024

Powered by FUDForum. Page generated in 0.02378 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top