10-26-2010 03:15 PM
We have a C# application that works as a wrapper around TestStand.
Is there a way to enable breakpoints for the current run via a method call?
Solved! Go to Solution.
10-27-2010 01:13 AM
10-27-2010 06:29 AM
Hello Ray & Thanks for your reply.
I fear my initial statement wasn't detailed enough, sorry. I am not looking to debug my DLL/application.
I am looking for a TestStand C# function call that will perform the same operation as choosing the Configure->Station Options... menu selection and then clicking on the Enable Breakpoints check box. Right now when I set a breakpoint in my sequence file and have my C# application run TestStand, it just ignores the breakpoint.
On a related note: When I'm running the sequence file, I can detect if a step is skipped (TraceEvent.ctxt.PreviousStep.ResultStatus), or forced to pass/fail (TraceEvent.ctxt.PreviousStep.GetRunModeEx()), is there a way to detect if a step has a breakpoint set?
10-27-2010 07:10 AM - edited 10-27-2010 07:13 AM
Hi,
I think you would use Engine.StationOptions and then StationOptions.BreakpointsEnabled setting this TRUE.
As for the Breakpoint status, I haven't use the WatchExpressions / WatchExpression but I am guessing you would need to get a reference to the WatchExpressions using Engine.GetWatchExpressions and then use the WatchExpressions.Item to get a specific WatchExpression.
From there you can probably check were if there is a breakpoint by maybe using WatchExpression.BreakpointTriggered.
There maybe an example of this in the TestStand Examples. (Just checked the on-line help and there doesn't appear to be an example)
10-27-2010 07:29 AM
Ah ha! That pointed me in the right direction!
I can access the Breakpoints Enabled flag using
ApplicationMgr.GetEngine().StationOptions.BreakpointsEnabled
I can determine if a step has a breakpoint using
TraceEvent.ctxt.NextStep.BreakOnStep
Thanks!