Visual studio can print call stack when breakpoint hit, and can stop when conditions are met, is there any way to combine that and stop when function is called from another selected one, and ignore all other calls?
Visual studio breakpoint conditional on the stack state
2.4k Views Asked by Vasaka At
2
There are 2 best solutions below
1

Not sure but you might be able to with either Filtering or Conditions, though it might be easier to just put the breakpoint on the calling process instead
This is a good resource: Mastering Debugging in Visual Studio 2010 - A Beginner's Guide
I believe the only way to do this is with a macro. Right click your breakpoint, choose "When Hit..", select "Run a macro", and point it to a macro that goes something like:
The above is half psuedo code; I didn't actually test it, but should work with some minor edits.
Note that this will be slow as hell if the breakpoint is hit a lot of times, because running macros from breakpoints is inherently very slow.
BTW, If you were asking about .NET / C# it would've been a lot simpler, you could've just made a conditional breakpoint on
...and be done with it.