How To Fix Script Errors

Logic errors are much more complicated to detect. Scripts that contain logical errors, are usually caused by bugs in the code or omissions in the logic program, otherwise it runs fine but returns wrong results. For example, a server-side script, designed to sort the list of values that can perform the sorting out of order if the string value comparison is used the sign> (greater) instead of <(less than).

Debugging Techniques

how to fix script errors? There are several different methods of troubleshooting and testing applications.

Timely (JIT) debugging

When the work server-side script is interrupted due to an error runtime script debugger starts automatically displays the file. Asp, indicating the line where the error occurred and displays an error message. With this type of debugging, called timely (JIT) debugging, program execution is suspended. Before the resumption of the script will be possible to correct errors in the script editor and save your changes.

Debugging with breakpoints

If an error occurs, the source of which cannot be found, it is useful to take advantage of breakpoint. Breakpoint suspends execution of the script on the specified line. You can set one or more different breakpoint before the line where the error occurs, and then use a debugger to see the values of variables or properties set when executing the script. After correcting the error breakpoint should be removed, so the script took place without user intervention.

To set a breakpoint, open the script editor, highlight the script, on which you want to abort, and select the Debug menu, click Toggle Breakpoint. Then re-request the script from a Web browser. After running the script lines to the breakpoint will run script debugger, displaying the script and points to the line where the breakpoint is set.

Stop at the next instruction

In some cases you may want to set the profile Script Debugger Break at Next Statement, if the next statement is executed is not in the file. Asp. For example, if you picked Break at Next Statement in the file. Asp, relating to the application Sales, the debugger will start when you run any script file in the annex Sales or in any application for which debugging is enabled. Therefore, if enabled Break at Next Statement, you should know that before any following statements in the script will be running the debugger.

How To Fix Script Errors

Tips for debugging scripts

In addition to the Script Debugger, a few good tips on debugging can significantly reduce the time required to detect sources of error. Despite the fact that the majority of errors such as misspelled command and missing variables, we can easily find some logical errors and run to find a very, very difficult.

Share |
This entry was posted in Uncategorized. Bookmark the permalink. | Comment

No Responses to How To Fix Script Errors

Leave a Reply

Your email address will not be published. Required fields are marked *

*



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>