I'm sorry if the question title may mis-inform you, but I cannot find a proper word to explain that.
If you ever working with .NET, you would know that there is Assert class that will automatically wake up and attach debugger if necessary and then have debugger (Visual Studio) pausing at the Assert command, given the Assert command failed.
Given I'm running a java program and having debugger connected, then how can I have debugger to break on certain condition without manually setup a break point?
I'm expecting something like that:
void doSomeThing(String x){
if (x==null) breakDebuggerNow();
}