Reputation: 5122
Does anyone know how to set a breakpoint in the following Person.toString()
when using Eclipse or IntelliJ IDEA?
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;
@ToString
@AllArgsConstructor
@Data
public class Person {
private String lastName;
private String firstName;
}
EDIT:
If possible, I want to stop only when toString()
is called.
Upvotes: 14
Views: 12483
Reputation: 46422
You're asking about both Eclipse and IntelliJ IDEA, and the answers are very different:
Umm, If possible, I don't want to change source code.
You're surely using version control, so nothing can go wrong, right? If not, then please start using it ASAP as I can't imagine any work without it.
The workaround is very easy despite having several steps:
Apart from debugging, which usually takes rather long, each of the steps takes one or two seconds. So there's hardly any overhead. Trust me, I do temporary code changes a few times a day.
Upvotes: 18