Breakpoints

You can use the Insert Breakpoint construct to insert breakpoint code into your reactive code for debugging. When the breakpoint is hit, Visual Studio is opened or you are prompted to open it. At that time, the debugging tools of Visual Studio are available for your use. Breakpoints should be used for troubleshooting purposes only and used with caution.

The Breakpoint construct is available in the Scenario tab of the Reactive Code dialog for Scenarios.

RC-breakpoint

When you are finished debugging, click Continue and then Detach All.

Requirements

A version a of Visual Studio that is capable of debugging Visual C# is required to use the feature. The minimum version for debugging reactive code is Visual Studio 2012.

The retargeting pack for .NET framework 4.6.1 must be installed for all versions of Visual Studio.

Cautions

When finished debugging, use the "Detach All" command in Visual Studio to exit the debugging process gracefully. Using "Stop Debugging" causes MxSuite to close.
 
Note that Detach all may not work, depending upon the debugging settings in Visual Studio. This is because sometimes the debugger cannot detach properly (especially if Unmanaged Code is selected to be debugged or if the MxVDev GUI is started explicitly via Visual Studio rather than attached). The only way to exit the session gracefully in this case is to continue the process and exit via MxVDev.

Terminating the debugging session while at a stopped at a break point or while stepping though the code will also cause MxSuite to close. (Regardless of whether "Detach All" or "Stop Debugging" is used.)

Saving all open scenarios and test cases is highly recommended, as there is some risk that the debugging process could cause MxSuite to close without the user's permission.

Putting the breakpoint in the Tick method is not recommended as it will cause the code to stop too frequently.

It is not necessary to save the solution or source files when closing Visual Studio, since the files created are temporary and frequently regenerated anyway. (Source Code changes to the reactive code should be made in the reactive code user interface of MxSuite, not from Visual Studio.)

 

Related Topics:

Reactive Code

Reactive Scenarios

Reactive TestCases