Reputation: 433
I am wondering if there is a way to search a specific value in variables while debugging.
For example, I have this code:
public void init(){
int a=5;
String s="Hello world";
boolean enable = true;
}
I want to search for value "Hello world" in all variables. So is there a way to put this value somewhere and debugger stops at point when it finds it?
Upvotes: 0
Views: 1522
Reputation: 165
Add a condition in your code like:
if(eventOccurs){
//put anything here
}
and then add the breakpoint inside the condition
Upvotes: 2
Reputation: 88
You can be following like below:
if(value==you want){
//Then debug and lookup objects values that you want to check.
System.out.println("Seting debug point of this line!")
}
Upvotes: 1