23.5 Utilizing Debug Mode

Use Debug mode to track down unexpected application behavior.

See Also:

APEX_DEBUG in Oracle APEX API Reference

23.5.1 Enabling and Disabling Debug Mode for an Application

Configure whether end users can run the application in debug mode by editing the Dubugging attribute in the Application Definition.

Running an application in debug mode is useful when an application is under development. For production applications, Oracle recommends disabling debugging and thus preventing users from viewing application logic.

Developer who are logged into workspace where the application resides can always run the application in debug mode. Debug can also be enabled programmatically regardless of this debug setting.

To enable or disable debug mode for end users:

  1. On the Workspace home page, click the App Builder icon.
  2. Select an application.

    The Application home page appears.

  3. From the Application home page, you can access the Application Definition page page in two ways:
    • Edit Application Definition button:
      1. Click Edit Application Definition to the right of the application name.

      2. Click the User Interface tab.

    • From Shared Components:
      1. Click Shared Components.

      2. Under Application Logic, click Application Definition.

  4. Under Properties, edit the Debugging attribute:
    • Yes - Enables the application debug mode using the browser at runtime.

    • No- Disables the application debug mode using the browser at runtime.

23.5.2 Controlling Debug Mode for a Page at Runtime

Control debug mode for the current page and session by clicking the Debug on the Runtime Developer toolbar.

You enable and disable debug mode for the current page and session by clicking the Debug on the Runtime Developer toolbar.

If debug mode is enabled, debug data is captured in the background. As long as the browser tab or window stays open, uses the current debug mode and level.

To enable or disable Debug mode for a page at runtime:

  1. On the Workspace home page, click the App Builder icon.
  2. Select the desired application.
  3. Run the application.
    The Runtime Developer toolbar displays at the bottom of any editable page.
  4. On the Runtime Developer Toolbar, click Debug. Available options include:
    • Enable Debug - Specifies the level of detail included when you click View Debug .

      • No Debug - Enables and disables debug mode

      • Info (default) - The debug log contains the default or normal amount of information. This corresponds with a log level of 4 and a Debug URL argument of YES.

      • App Trace - The debug log contains messages up to level 6. This corresponds with a Debug URL argument of LEVEL6.

      • Full Trace - The log will contain the maximum amount of information. This corresponds with a Debug URL argument of LEVEL9. Full Trace can slow request processing but provides the most amount of detail.

    • View Debug - Displays debug information for the current page.

See Also:

23.5.3 Viewing Debug Messages at Runtime

View debug message at runtime by clicking the Debug, View Debug on the Runtime Developer toolbar

To view debug messages for the current page and session at runtime:

To view debug reports for the current page and session at runtime:

  1. On the Workspace home page, click the App Builder icon.
  2. Select the desired application.
  3. Run the application.
    The Runtime Developer toolbar displays at the bottom of any editable page.
  4. On the Runtime Developer Toolbar, click Debug and then View Debug.
    The Debug page appears.
  5. Click the View Identifier to the left of the session you want to view.

    The Debug page appears.

  6. To view steps that took the longest, hover over that step on the graph above the report.

    The step details display.

  7. To go to that step in the report, click the bar.

    Note:

    Debug sessions listed in the report live for at least 2 weeks and age out along with the activity log. This is usually more than adequate for debugging purposes.

23.5.4 Viewing Debug Messages from Utilities

View all debug messages generated by an aplication from the Utilities page.

To view debug messages for an application from the Utilities page:

  1. On the Workspace home page, click the App Builder icon.
  2. Select the desired application.
  3. Click Utilities.
  4. On the Utilities page, click Debug Messages.
    The Debug Messages page appears.
  5. Click the View Identifier to the left of the session you want to view.

    The Debug Message Data page appears.

  6. To view steps that took the longest, hover over that step on the graph above the report.

    The step details display.

  7. To go to that step in the report, click the bar.

    Note:

    Debug sessions listed in the report live for at least 2 weeks and age out along with the activity log. This is usually more than adequate for debugging purposes.

23.5.5 About Using f?p Syntax to Access Debug Mode

Use f?p syntax to run an application in debug mode.

To use f?p syntax to run an application in debug mode, simply call the page and set the Debug argument to YES or LEVELn, where n is between 1 (least detailed) and 9 (most detailed). For example:

f?p=100:1:&APP_SESSION.::YES

23.5.6 Viewing Debug Messages for an Application

View debug messages for an application by clicking the Find icon.

To access debug messages for an application:

  1. On the Workspace home page, click the App Builder icon.
  2. Select the desired application.
  3. From the toolbar at the top of the page, click the Find icon.
  4. Click the Debug tab.
  5. Click the View Identifier to the left of the session you want to view.

    The Debug page appears.

  6. To view steps that took the longest, hover over that step on the graph above the report.

    The step details display.

  7. To go to that step in the report, click the bar.

    Note:

    Debug sessions listed in the report live for at least 2 weeks and age out along with the activity log. This is usually more than adequate for debugging purposes.