When Calling a Function Hundreds of Times, Which Call Failed?
Full Problem Description: My program fails on a call to a certain function, CnvtV
. The program probably calls that function a couple hundred times before it fails. If I set a location breakpoint on CnvtV
, the program stops on every call to that function, and I don’t want that. I don’t know what conditions cause the call to fail, so I can’t set a conditional breakpoint. What can I do?
You can set a conditional breakpoint without specifying a condition. Set the Skip Count field to a value so high that it will never be reached. In this case, since you believe the function CnvtV
is called a couple hundred times, set Skip Count to 1000 or more. Then run the program and wait for it to fail. When it does, open the Breakpoints dialog box and look at the list of breakpoints. The breakpoint you set on CnvtV
appears, followed by the skip count and number of iterations remaining:
at “CnvtV(ParamList)” skip 1000 times (750 remaining)
You now know that the breakpoint was skipped 250 times before the function failed. If you reset the breakpoint with a skip count of 250 and run the program again, the program stops at the call to CnvtV
that caused it to fail last time. For more information, see .