Evaluate expressions in runtime using Console
Define, declare, and verify new variables and functions while you debug a script in runtime using Console. The script execution must be paused to use Console.
Before you begin
Role required: script_debugger or admin
About this task
You need to be aware of a few limitations when you use Console to evaluate expressions while debugging a script in runtime.
- The properties and values of an object don't display in Console. When you try to display an object to Console, only the string value of the object appears.
- Console doesn't support GlideSystem printing methods, such as info() and print().
- You can't use the this keyword in Console.
- A script debugger timeout occurs when you evaluate expressions in Console.
- While executing long scripts, if you see the response Awaiting response from server, you can't resume debugging or stop debugging using the resume or stop controls.
Procedure
Result
After a statement is executed, it is stored in the browser cache. You can use the up arrow key to get the previous statement and down arrow key to get the next statement from the browser cache. You can configure the number of cached statements for a session from user preferences. For more information about user preferences settings, see Script Debugger and Session Log.