Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting a Java breakpoint on a one-line conditional return statement

Do any Java debuggers allow you to set a breakpoint on the someOperation(); method invocation statement in the following statement?

if (someCondition()) someOperation();

Note that I'm looking for an answer to a very specific question here.

  1. I am not interested in setting a conditional breakpoint on the line that evaluates someCondition() to determine when the appropriate time to halt is.
  2. I am not interested in setting a breakpoint inside the someOperation() method.
  3. I am not interested in the case where the condition and method call statement are on different lines.
like image 336
Sam Harwell Avatar asked Sep 14 '25 00:09

Sam Harwell


1 Answers

I updated my blog with a new article discussing the current state of Tunnel Vision Labs' Java debugger for Visual Studio. In the article, I included the following animated image showing the current behavior of this debugger.

Individual Statement Stepping

like image 155
Sam Harwell Avatar answered Sep 15 '25 13:09

Sam Harwell