HowTo Use webframe Debugging Point
Debugging Point – Useful Notes
As we start with e-point, it’s useful to share experience on how to deal with situations where code and scripts aren’t working as expected.
These notes describe the debugging capabilities of e-point and need no additional software such as InterDev.
e-point has the ability to display a debug console underneath the normal web view of e-point.
The debug console is a scrolling window and shows debugging messages and SQL trace information.
Turning on the Debug Console
The debug console is activated by setting a debug flag in a users session. The easiest way to do this is by editing the page that processes the logon using any text editor.
In ASP/ProcessLogon.asp, turn on debugging and SQLTracing with the following lines
These lines are already in the page but deactived (set to 0). Just change the zeros to ones as shown by the bold text above.
You need to connect to e-point using the debug start page to access the debug console. This file is called "e-point_Debug.htm". You need to edit this file using Notepad.
It points to two other files which you should check, and change the page name shown
in bold, (see below).
<TITLE>e-point debug frame</TITLE>
<frame name="WebPOINTFrame" src="e-point_frame.htm">
<frame name="DebugFrame" src="debugframe.htm">
Now open the debug page in your browser, e.g.
Select the portal you wish to debug.
In the above example we have also activated SQL tracing. This displays all SQL
statements as they are executed. This can be useful for DBA’s and developers.
The debug console also displays context information about the collections and records being used. The screen above shown the context for a Personal Workload detail.
Adding Debug Messages
The debug console can now be used to help debug scripts and functions. You need to add lines to your code to write helpful messages to the console. The messages can be any valid HTML string. You can include the values of variables etc but generating a valid string. Remember to convert numeric values to strings before using them in a message.
WARNING: You should always use the code in a try..catch block, because the debug window may not always be available.
To write a message to the console use the command
Message can be any string in HTML format. This means using HTML commands such as <br> to format the output. This means you can construct messages such as;
Webpoint.logInfo("<br/>Executing action : "
You can turn off the SQL tracing to avoid losing your messages in the long SQL messages, but it is often useful to see the SQL being generated as part of your code.
The logInfo function can be added to POP functions or added to scripts as a codeblock (with a try, catch block).