How to Quickly Debug a PL/SQL Body Returning a SQL Query for a Report in Oracle APEX

Опубликовано: 19 Март 2026
на канале: Chip Baber
5,265
44

With just 3 lines of code you can move your debug logs right to the top of the Oracle APEX debugger and quickly identify and fix errors as you generate dynamic SQL.

In this video we will demonstration how to debug a SQL error inside of a reporting in APEX. We will generate our SQL statement dynamically in the tool through the PL/SQL Body Returning a SQL Query for a Report. We will start by inserting a bug into 1 of 3 options for the dynamic query. When the error occurs in the application, we will walk you through step by step how to add in a APEX_DEBUG.ENABLE(apex_debug.c_log_level_info) command to flip on logging, then output messages to troubleshoot your code through the apex_debug.message API. Next we will show you how to view the custom debug message, test the broke SQL statement in SQL workshop, identify the problem then resolve the issue in the code. This shortcut method works great for simple bugs inside Oracle APEX. But we also show you how to enable more complex auditing directly in the tool via the development interface.

To view the code showcased in this video please visit.
https://github.com/chipbaber/apex_tex...

Oracle APEX debugging trick. #apex #debug #hack #oci #oracle