4 - Debugging
ScriptServer offers a descriptive error page with a possibility to display the code that produced the error. You can use this information to derive the error source and correct it. This tutorial will give you a course of action to follow when you run into error pages. Finding the bugMost often you get an error message in front of you when something goes wrong. Typically it looks like this: If you cannot see the buttons, then you do not have permission to edit the code of the error producing page or its template. If you have a different kind of error page, then you will need to change the setup of your error pages. This is done in registry and described elsewhere. The screen will tell you that the error occurred in the page Dev\test\kirne\sampleError at line 7. If you know which template this page is using, open it in Template Workshop. If you don’t know, or if your page is not using a template at all, then open the page in System Editor. Scroll down to the line number and that should be where your bug is. The line number is wrong!If you can’t find the bug in that page and on that line number, you are most likely using a Scriptlet method on your page, and the line number refers to the line in the Scriptlet. To make sure that the error producing code piece is not your template, click the button “Show original script code”. You will now get a pop up window with the code displayed. If this code is not the code in your template, do the following:
Show me the outputTo view the output created before the error halted the execution of your script, click the button on the error page entitled “Show discarded response”. Note that ScriptServer for some curious reason never displays the last character before the error occurs. |
Published by: Henrik Weimenhög / scriptserver.com

