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.

2 comments
Comment actions Permalink

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.

0
Comment actions Permalink

Thanks!  I have had this question for a long time.  Should have asked here!

0

Please sign in to leave a comment.