Interactive debugging with Visual Studio

This topic describes the debugging process if you have selected Visual Studio as your script editor, and you leave the Visual Studio Modeless option selected in the User Preferences > Design Time tab. This is the default.

To interactively debug a script using Visual Studio:

  1. Open a form and enter Design Mode.
  2. From the Edit menu, select Script Editor .
  3. In the Editing Script in Visual Studio dialog box, select the Compile for Debug check box.
  4. Click VS IDE.
  5. In the script code, set a break point on the desired line.
  6. Under the Visual Studio Debug menu in the debugging session, click Attach to Process.
  7. Select an instance of the WinStudio.exe process whose Type is Managed (version), x86 and whose Title is Editing Script in Visual Studio.
  8. Click Attach.
  9. Minimize the Visual Studio debugging session.
  10. Perform an action in the form that calls the script. When the script is called and the breakpoint is encountered, focus changes to the Visual Studio debugging session attached to WinStudio. From this point, you can debug the script as you would debug any VB.NET code.
  11. When you are done debugging, on the Debug menu in the Visual Studio debugging session, click Stop Debugging.
  12. Close Visual Studio.
  13. Save the form definition.