break point conditioned on call stack
In IDEA 8.x, is it possible to set a break point conditioned on the call stack? For example, suppose I have a method foo that is invoked by both bar1 and bar2. I set a break point somewhere in foo, but only want to suspend execution if foo is called by bar2 when the break point is hit. Is there a way to specify such a condition?
Thanks.
请先登录再写评论。
You can achieve this by doing the following:
- Set a breakpoint somewhere inside bar2;
- Open the properties panel and set "Suspend policy" to "None";
- Set a breakpoint inside foo where you want to stop;
- Open the properties panel and choose your first breakpoint in the "Depends on" selection.
Thanks! I have had this question for a long time. Should have asked here!