P Varga
P Varga

Reputation: 20269

Java method watchpoints in Eclipse

I would like to log something to some Eclipse view after/before specific methods are entered in my Java project.

Is this possible?

ADDITIONAL INFO 1: I am using Eclipse 4.2

Upvotes: 2

Views: 321

Answers (1)

Bananeweizen
Bananeweizen

Reputation: 22080

Create a normal breakpoint in the method, add a condition like

System.out.println("hit the method"); return false;

That breakpoint will always be evaluated, but it will not stop the debugger. You can use the same technique also with a method breakpoint (instead of line breakpoint) and there you can additionally specify whether it shall be evaluated on entering or leaving the method.

Upvotes: 2

Related Questions