Databases Reference
In-Depth Information
APEX Debug
Just like instrumenting your JavaScript code, it's equally important to instrument your PL/SQL plug-in
code. APEX makes instrumenting plug-ins very simple by providing API debugging functions for each
type of plug-in. All of the examples in this topic leverage these API calls.
At the beginning of each plug-in, you should always reference the appropriate debug procedure
based on the plug-in type. The procedure looks like APEX_PLUGIN_UTIL.DEBUG_<plugin-type> . For
example, the region type debug procedure call is APEX_PLUGIN_UTIL.DEBUG_REGION . Additional
information about each of these procedures can be found in the API documentation.
The following example shows how you can view the output from the plug-in debug call and what
type of information it stores. This example references the region plug-in that was created in the chapter
on region plug-ins.
1.
Log into the APEX Application Builder, then run the demo application.
Logging into the APEX Application Builder first allows you to easily run
the application in debug mode.
2.
Run the application and go to page 40 (RSS reader). At the bottom of the
page, click the Debug button in the APEX Developer Toolbar as shown in
Figure 8-7.
Figure 8-7. APEX Developer Toolbar
3.
When you click the Debug button, the page reloads and it appears as
though nothing happened. In fact, when the page reloaded, it stored a lot
of debug information. To view this information, click the View Debug
button (to the left of the Debug button) on the APEX Developer Toolbar as
shown in Figure 8-7. A new window should pop up, which should look
like Figure 8-8.
Figure 8-8. APEX debug message data window
4.
Click on the most recent page-view link. From Figure 8-8, this would be
43041 under the View Identifier column. Since the View Identifier number
is a unique number, it will probably be a different number.
 
Search WWH ::




Custom Search