Rich UI debugging
- You can use the following EGL debugging preferences, as described
in "Setting preferences for the EGL debugger:"
- Stop at the first line of the initial run unit
- Set systemType to DEBUG
- The settings in the Service Reference tab in the Default behavior mapping window
- You do not need to create a runtime configuration to start a debugging
session. If you click the Debug icon on the toolbar of the Rich UI
Preview view (not the Debug icon on the toolbar of the workbench),
a configuration is created for you. A configuration is also created
for you if you do as follows:
- Right-click the EGL file that contains the Rich UI handler
- Click
To launch the previously launched runtime configuration when you click the Debug icon on the workbench toolbar, set this preference:- From the main menu, click . The Preferences page is displayed.
- Expand Run/Debug and click Launching. The Launching window is displayed.
- Click Always launch the previously launched application.
- To save your changes and exit the page, click OK.
- In the Debug perspective, you complete the usual set of debug activities (Step Into, Step Over, and so on), as described in the topic "EGL debugger commands." The Jump to Line command is not available.
- When a debug session starts, the application runs in an external browser, and you can edit your code, set breakpoints, and inspect variables. The EGL debugger does not support hotswapping for Rich UI, which is the processing of changes that were made to declarations and logic statements during a debugging session.
- To end a debugging session, click the red icon in the Debug perspective. When the debugging session ends, you are in the Debug perspective, with your source code open in the EGL editor.
During a debugging session, your Rich UI handler may invoke the
source for libraries (which run in a browser) and for services (which
run in a simulated server). Here are some implications:
- When you debug the library, the rules are as described earlier.
- When you debug the service, the full power of EGL debugging is
available to you. Be aware of the following, general restriction: if code requires an HTTP session, you cannot access that code unless it is running on an application server. In particular, if a dedicated service invokes j2eeLib library functions, you can access the service from the Preview tab only if the service is deployed on a test server. When development is all-but complete, you change the service-access variable declaration and then deploy all the EGL-generated code:
- The initial variable declaration might be as follows:
myService MyServicePart {@BindService{}}; - Here is the replacement:
myService MyServicePart{@dedicatedService};
- The initial variable declaration might be as follows:
- When you debug a library that is invoked from the service, the library is local to the service, and the full power of EGL debugging is available to you.