11. Other built in functions
procedure ShowMessage(const Msg, Head : WideString)Show a message box with OK button.
Head - Window title
Msg - Message text
12. Debugging the script (check for errors)
Before you can tell the script is ready you must test it first. Start PVD with
-debug command line parameter, like this:
viddb.exe -debugWhen you do this an additional menu item will become visible in "Help" menu called "Log".
In the log you can track following information:
- what plugins are loaded by PVD
- what scripts are compiled and executed
- what errors were found while compiling a script
- what URLs are downloaded by PVD
If a script is wrong (contains errors) it will not be loaded into the program, so it can not be selected from the Import menu or visible in Preferences -> Plugins.
If an error acquired while compiling a script, an error message apears in log with detailed information about the wrong line in script code and type of an error.
Ex.:
[Error] (366:2): Semicolon (';') expectedSometimes you can find hints produced by script compiler.
Ex.:
[Hint] (368:2): Variable 'TEST' never usedIf a script can be compiled but does not work as it should you could use the ShowMessage function to output variable values and check the URLs PVD downloads in program log.
The last page downloaded is save into a file page.html in program directory while in
-debug mode.