For simple JavaScript functions it is often sufficient to output a small message for testing and debugging with alert():
function test(s) CallJS test "Hello" and receive the following small popup on your screen:
For more complex functions in JavaScript it is practical to work with a debugger. The easiest way to call the debugger is to use the "Attach to Process..." function of Visual Studio:
Here select the process "saplogon.exe" and "Script Code" in
the selection box. Debug -> Break All
Then execute the JavaScript function via the GuiXT script. The debugger becomes active at the first executable line of the function:
Another possibility is to stop the JavaScript function at a certain position with the "debugger" statement:
You
can now proceed step by step, display variables and use the other
functions of the debugger, e.g. set dynamic breakpoints or display
variables.
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main Disable Script Debugger="no"
|