Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Process Simulation

Debugging Method 2: Debug a ​.csx file

  • Last UpdatedJan 06, 2025
  • 1 minute read

This method is easier than Debugging Method 1: Debug a .csx file because it has fewer steps, but it does require you to modify your .csx script.

As with Debug Method 1, you must have Visual Studio installed to use this method.

Debug a .csx file

  1. From the place in your script that you want to break into the debugger, add the following line:

    System.Diagnostics.Debugger.Break();

  2. Run your script as usual. When this line is encountered, Windows notifies you that the process is expecting to be debugged and asks you which debugger you want to use.

    Visual Studio should be one of the choices (or the only choice).

  3. Select Visual Studio and tell it to continue.

    Visual Studio opens and places you in the debugger at that point in your script.

  4. Remove the line from step 1 after you're finished debugging your script. Otherwise, the debugger tries to open every time the script runs.

Related Links
TitleResults for “How to create a CRG?”Also Available in