Search code examples
javadebuggingidebreakpoints

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.

Solution

  • 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