How to debug the program with PauseForUser function?
bertseva
I have to modify the complicated interface which uses PauseForUser, and as I use the debugger to read the program I can't do anything because this function is blocking everything except the action on the panel. I would expect that if I click on the panel the action would take place and I can continue the debug. But this is not happening.
If I set the breakpoint after this function, everything is fine - I do my action, then arrive at the breakpoint.
If I set the breakpoint before this function, and then try to advance, then arriving to this line I can't click on the graph window, and I can't do the next step.
Even if I If I set the breakpoint before and after this function, debug the program until several lines before, then press "run", the debugger does not arrive to the next breakpoint - it stops on PauseForUser and does not let me do the required action.
If it is of any help, the function is called like that:
PauseForUser WMImageThresholdGraph,$NameOfWave(Ch0ThreshPic)
Thank you in advance!
I'm afraid the best way to debug problems with PauseForUser is to fall back on old-fashioned techniques: print out values from the code that runs during PauseForUser.
You have a targetWindow that has the same name as a wave?
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
March 2, 2016 at 12:52 pm - Permalink