Reputation: 9283
I'm debugging web app, which produces very complex bean as result of form, and I'd like to know if value that I entered on some form field is present somewhere or not.
Is there any way to find if some of my variables (on debug list) has given value?
PS:
There isn't any way to search thou all variables (I have hundreds of them...) shown in debug list? Problem is that this bean is made of tens of hashmaps and lists, on different levels. And real problem is that I don't really know which variable holds this value or if it wasn't saved to any variable. And I can't write such big expression cover all of variables, structure is too complex.
Upvotes: 3
Views: 3509
Reputation: 10285
Add a breakpoint at a location where you can access the variables you want, then add a watch for each variable and you can see the list of the values of the variables in the watch list
PS: In a watch you can write whatever Java code you want such as x.equals("value")
and it will output true if equals or false if otherwise. Or you can just visualize the variable's value directly
Upvotes: 1