[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.pdt] Re: Possible to search variables array key/value?

Matthew,

To expand on Dave's comment towards the end of his post. Watch Expressions are a very powerful part of debugging. Unfortunately when you first go into PHP Debugging mode that view is not present. If you go to the menu for Window -> Show View -> Expressions you will get a new tab available. Within this view you can create expressions that you want to evaluate wherever you are in your code. You could then setup an expression to do an array search for the key / value you want and as you step through the code the expression would continue to be re-evaluated. It provides a lot of power over the Variables view as that is just a full dump of all the variables.

--
Shawn Clark

Matthew Young wrote:
Oh no.  I'm sorry I didn't make it clear. I don't mean how to search
using PHP.  I mean while degugging, I want to look some specific key
or value of a large array dispalyed in debugger's variable view.

On Thu, 19 Feb 2009 11:03:09 +0100, "Michael N. Madsen"
<mnm@xxxxxxxxxx> wrote:

Search for value, reutns key: http://www.php.net/manual/en/function.array-search.php

Search for key, returns true: http://www.php.net/manual/en/function.array-key-exists.php