Page 1 of 1

How to DEBUG a project

Posted: Fri Aug 09, 2019 3:21 pm
by Support_Julie
How to DEBUG a project

When working with a failing project, set the log level to debug to retrieve the most amount of information. (see forum link) how-to-set-project-log-level-1113#p2473


After executing the project, click on the “View Job Log” link to view the log information.

pic1.png
pic1.png (20.43 KiB) Viewed 11589 times

If needed, secondary error logs will be written out. You can access these logs by clicking on the drop-down next to the log number.

pic2.png
pic2.png (18.54 KiB) Viewed 11589 times



Adding PRINT tasks to job log


One debugging technique is to add PRINT tasks to your project.
In my project, I have a variable called var1. In the PRINT task, you can reference that variable.

pic3.png
pic3.png (10.34 KiB) Viewed 11589 times

When you execute the project, it will be displayed in the job log.

pic4.png
A Rowset value cannot be printed. You will need to save the value to a variable first. For example, if you have an output rowset called ${data} and you want to print the value of the third field to the job log, first set a variable. Then use the new variable in your PRINT task. For var2, the value will be ${data[3]}. Then in the PRINT task, reference ${var2}.


The variable syntax is ${RowsetName[x]} where x is the column that you want to reference.

pic5.png
pic5.png (5.81 KiB) Viewed 11589 times



Debug button

To test your logic, click on the “Debug” button to step thru your project one task at a time.

pic6.png
pic6.png (18.01 KiB) Viewed 11589 times

This particularly helpful in stepping thru your project logic. As you step thru the project, the values for your variables will be updated.

pic7.png

After your project is working as you intend, remember to set the log level back to your normal setting.