ScriptingDebug Scripts

Debugging Scripts
Packing Partner's built in script editor allows you to debug your code by viewing variables and examining running code.

Debug Mode

The script will build and run in debug mode, whenever there are breakpoints in the script.
Once debugging is complete all breakpoints should be removed, so that the script can run in live mode, which runs much faster.

Debug Toolbar

The debug toolbar and tabs allow you to debug your script while you create it, and when it is running.

Debug Tabs



Errors

This tab shows compiler warnings and errors. Click an item in the list to show the line in the script editor.

You can also hover over the icon in the editor margin to see the error description.

Console

In this tab you can execute and evaluate code statements in real time. To execute code, type the code in the console. To evaluate a statement or expression, prefix it with: ?


Output

Shows the output from Print method executed in your code. Use the Print method to watch values from your code while it is running:

Program errors and other output from browser javascript, is also sent to this tab.

Tip
In the console, use the up/down arrow keys to cycle through the previous statements you have typed.

Debug controls




Enable breakpoints. This does not remove breakpoints, just prevents them from being activated in the code.

Step to next line of code.

Continue running code. Will break if another breakpoint is encountered.


Stop script running. When the script is stopped, click the build button on the main toolbar to run it again.



Show object inspector window. In the object inspector you can evaluate and view results in a tree or text view.

Evaluate Values

Console tab
You can evaluate any expression by typing it in the console tab, and pressing Enter.
Debug hover
When the script is stopped on a breakpoint, hover over any in scope variable to see it's value.
Object viewer
Right click on any variable to evaluate it in the object inspector.