Modal debugging with Visual Studio

This topic describes the debugging process if you clear Visual Studio Modeless in the User Preferences > Design Time tab.

To debug a script with WinStudio, you create a separate debugging session in Visual Studio, attach the WinStudio process, and then call the script in WinStudio Runtime Mode. You can then debug the script in the debugging session.

To modally debug a script using Visual Studio:

  1. Open a form and enter Design Mode.
  2. From the Edit menu, select Script Editor .
  3. Close the Visual Studio IDE.
  4. In the WinStudio dialog box Editing Script in Visual Studio, select the Compile for Debug check box.
  5. Click Debug. If the script compiles successfully, it opens in another instance of Visual Studio, a "debugging session."
  6. Set a break point on the desired line in the script in the debugging session.
  7. Under the Visual Studio Debug menu in the debugging session, click Attach to Process.
  8. Select an instance of the WinStudio.exe process whose Type is TSQL, Managed, x86 and whose Title is Editing Script in Visual Studio.
  9. Click Attach.
  10. Minimize the Visual Studio debugging session.
  11. Click OK to close the Editing Script in Visual Studio dialog box.
  12. Exit WinStudio Design Mode.
  13. 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.
  14. When you are done debugging, on the Debug menu in the Visual Studio debugging session, click Stop Debugging.
  15. Close Visual Studio.
  16. Save the form definition.
Rubriques liées