Skip Headers

Oracle® HTML DB User's Guide
Release 1.5

Part Number B10992-01
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Master Index
Master Index
Go to Feedback page

Go to previous page
Go to next page
View PDF

9 Debugging an Application

This section describes a number of approaches to debugging your application including viewing Debug Mode, enabling SQL tracing, viewing page reports, and how to manually remove a component to isolate a problem.

This section contains the following topics:

About Tuning Performance

For applications having a large number of concurrent users, maintaining optimal performance is critical. To optimize your application's performance, remember to utilize the following Oracle HTML DB features:

Remembering to Review Session State

Many application are based on data contained within application items. For example, buttons may display conditionally based on a value stored in session state. You can view current session state for a page in your application by clicking the Session link on the Developer Toolbar.

Accessing Debug Mode

Viewing a page in Debug Mode is effective way to track what the HTML DB engine is doing as it renders a page. You access Debug mode by clicking the Debug link in the Developer Toolbar.

Debug Mode displays time codes that correspond to specific HTML DB engine functions. This can be useful if you want to determine when the engine is setting session state. The bottom of the page displays an augmented version of the Page Definition. In addition to enabling you to link to page and component attributes, you can view additional details about item names and computation and processing points. To exit Debug mode, click No Debug in the Developer Toolbar.

You can also use f?p syntax run a application in Debug mode. Simply call the page and set the Debug argument to YES. For example:


Enabling SQL Tracing and Using TKPROF

Tracing your session can be a very effective way to debug an application. From a database perspective, each page request is a single database session. If you enable SQL tracing, then Oracle HTML DB creates a temporary file you can then analyze using the TKPROF utility.

You enable SQL tracing in Oracle HTML DB by using f?p syntax to set the argument p_trace=YES. For example, to trace the display of page 1 in application 100 you would use the syntax:


To use the TKPROF utility:

See Also:

Oracle Database Performance Tuning Guide for more information on using the TKPROF program or contact your database administrator

Monitoring Application and Page Resource Use

You can monitor the resource use of Oracle HTML DB applications and pages by calling the built-in package DBMS_APPLICATION_INFO. Whenever the HTML DB engine renders or processes a page, the module is set to HTML DB and includes the application ID and page ID. Once set, you can use the V$SESSION and V$SQLAREA views to monitor transactions.

Viewing Page Reports

Every Page Definition includes a Page Reports list in the left navigation pane. Each report offers a different presentation of the components that define the page. In particular, the Page Detail Report describes all currently defined page components and processes.

To access the Page Detail Report:

  1. Click the Build icon.

  2. From the Available Applications list, select an application and click Go.

  3. Navigate to the appropriate Page Definition.

  4. Click Page Reports in the left navigation pane to expand the list.

  5. Click Page Detail (popup page).

    Once the Page Detail Report appears, you can select the following options at the top of the page to display or hide information:

    • All. Enabled by default. Displays detailed information about the current page including defined regions, items, buttons, processes, validations, branches, and computations.

    • Regions, Items, and Buttons. Displays detailed information of all items and buttons defined in each region of the page.

    • Processes. Displays details about defined processes including source code.

    • Validations. Displays any defined validations performed on the current page.

    • Branches. Displays information about branching performed on the current page.

    • Computations. Displays details about computations on the current page defined at the page or application level.

Debugging Problematic SQL Queries

If your query does not seem to be running correctly, try running it in SQL Plus or in SQL Workshop. Either approach will test your query outside of the context of your application, making it easier to determine what the problem is.

Removing Components to Isolate a Problem

If you have problems running a page, try removing components one at time. Using this approach, you can quickly determine which components may be the source of your problem. You can quickly disable a component by selecting the conditional display attribute NEVER.

To remove a component using conditional display attributes:

  1. Click the Build icon.

  2. From the Available Applications list, select an application and click Go.

  3. Navigate to the appropriate Page Definition and then to the attributes page for the component you wish to disable.

  4. Scroll down to the Conditional Display attribute and select NEVER.

  5. Click Apply Changes and return to the Page Definition.

  6. Try running the page again.

  7. Continue to remove components until the page runs correctly.