Set either or both of the following profile options, at Site or User level:
Forms Runtime Parameters record=collect
Log out of the applications, and log back in again. When a core-Forms session is launched, you will see a message to say that Forms Runtime Diagnostics is enabled.
The trace file will be in $FORMS_TRACE_DIR on the applications server (not the database server). It will be named collect_PID.