Use the following programming techniques to make debugging your script easier:
Write your script and run it within the native engine (HiQ or MATLAB) for testing and debugging purposes before you import it into LabVIEW. In HiQ, you can right-click the script node and select Edit in Server to debug in a HiQ script window.
Verify your data types. When you create a new input or output, make sure that the data type of the terminal is correct. Also, create controls and indicators for your inputs and outputs so you can monitor what values are being passed between LabVIEW and the native engine. Refer to Configuring the Data Type of a Terminal for more information.
Take advantage of the error-checking parameters for debugging information. Create an indicator for the error out terminal on a script node before you run any VI so you can view the generated error information at runtime.
Debugging HiQ Scripts
You use a HiQ script window to edit, compile, and run your script directly from HiQ to ensure that your script behaves properly.
Right-click the HiQ script node and select Edit in Server to launch HiQ.
Within HiQ, right-click the HiQ script window containing your HiQ script and select compile from the shortcut menu. A message window appears telling you of any compile-time errors. You do not have to compile the script explicitly. HiQ compiles the script automatically when you run it.
Right-click and select Run from the shortcut menu. A message window informs you of any runtime errors.
To access HiQ context-sensitive online help, place the cursor inside any function and press <F1> to bring up the online help for that function. You can use this information to help you build your script.
Close the HiQ window to update and return to the HiQ script node on the LabVIEW block diagram.