Skip to main content »

HotDocs Hints: Using the DEBUG Instruction

Cybersecurity

Scripting in HotDocs computations can often be quite lengthy and complex. It’s not uncommon to get to a point where the computation you are working on produces an unexpected result, and you can’t figure out why. This is where the HotDocs DEBUG command comes in handy.



If you place a DEBUG instruction at the top of your computation script and click “Test” in the bottom left-hand corner, HotDocs will start a test interview. You can then click on the “Enable Debugging” button on the toolbar (it’s the button with the big red dot on it), which will launch the HotDocs Debugging Tool.



Clicking on the “Step Into” button will move you through the computation script line-by-line and show you exactly what result is being produced (the table in the bottom half of the screen shows the current RESULT of the computation, along with the values of any variables on the “Watch List”). If you want to skip over parts of the script you can click on the “Step Over” button.



You can also use the DEBUG instruction within a template to see how HotDocs processes it in detail (you’ll need to select the “Other Fields” option on the HotDocs ribbon/toolbar and then choose “DEBUG” as the field you want to insert).

Share this article