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.
What is Lombok. Project Lombok (from now on, Lombok) is an annotation-based Java library that allows you to reduce boilerplate code. Lombok offers various annotations aimed at replacing Java code that is well known for being boilerplate, repetitive, or tedious to write.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With