Debugging WMLScript files is very similar to debugging any scripting language. Formal debugging facilities are limited, requiring you, the programmer, to build your WMLScript code incrementally, testing and debugging each block as you work. Use your UP.Browser to test your script each time you add a new block of code.
Aside from checking your WMLScript code for compiler errors and the desired output, you can test internal functionality by printing important script information to the browser console. The types of information you would display in this way include the values of variables and status information.
The WMLScript Console library provides two functions that make it easy for you to print any information to the browser console: Console.print and Console.printLn. The next section defines these functions and shows examples of how to use them.