See: Oracle Apex - Debug (Messages)
Enabling Application Tracing by specifying &p_trace=YES on the URL when displaying a page. The ability to generate a trace file is already controlled if the application has Debug enabled.
To control application tracing at the instance-level: Administration > Manage Instance > Instance Settings > Feature Configuration. > Monitoring > Enable Application Tracing