Enabling Debug on APEX Builder

When reporting a problem in the forums or in an Oracle Support ticket, if that problem occurs in the APEX Builder itself, the first instinct is to report the error message received. For example, “I’m getting ORA-01722: Invalid Number.”

Providing additional context about where that error occurs can greatly help members of the APEX community to diagnose what might be happening. Often you can obtain this extra info – for example, a PL/SQL call stack – by using a second instance of the APEX Builder to enable debug tracing on your original APEX Builder session where you’re experiencing the problem.

Using a Second APEX Builder to Debug

To do this, you need to use two separate browsers (let’s say Chrome and Firefox). It can also be done using an incognito/private window of the same browser, but for simplicity of explanation, I will explain it with Chrome and Firefox. In our scenario, “Chrome APEX” will be the builder experiencing the problem and “Firefox APEX” will be the second instance used to debug the first.

Using “Firefox APEX” Builder to enable debug tracing on “Chrome APEX” Builder’s session
  1. Open the APEX Builder in Chrome and get to the step just before the error will occur when you will click (Next) or (Save) or (Apply Changes)
  2. Open the APEX Builder in Firefox and login to same workspace as in 1
  3. In Firefox APEX builder, click the icon with “person with wrench/spanner” > Monitor Activity > Active Sessions
  4. Study the address bar in Chrome APEX to notice the session id
  5. In Firefox APEX builder, click on the session id from step 4
  6. In Firefox APEX builder, set the debug level to “Info” on the session of the Chrome APEX builder and click (Apply Changes)
  7. In Chrome APEX Builder, click (Next) or (Save) or (Apply Changes) to cause the problem to occur
  8. In Firefox APEX builder, set the debug level back to “Disabled” on session for Chrome APEX and click (Apply Changes). This also refreshes the list of Page Views to show the latest debug tracing requests that were captured.
  9. In Firefox APEX builder, notice the latest debug log entry with highlighted link to view debug trace of Chrome APEX
  10. In Firefox APEX builder, viewing the debug trace of Chrome APEX, once you’ve identified the error is contained in the request log you are viewing, then save the log to your coputer by choosing Action > Download to download the log as HTML.

Now, you can attach the HTML file to your forum posting or Oracle Support ticket. In the case of the forum, you may have to rename the file to have a .html.txt extension to make the forum attachment restrictions happy.

This will help anyone reviewing your post or support ticket to better assist you in triaging what might be going wrong and ideally quickly suggest a workaround or alternative way of accomplishing the same task.