Or you can just attach custom dbg tracing actions to Oracle errors, like I've done (for wait events) here:

trace("stack is: %\n", shortstack())https://t.co/n8goA8HXIu pic.twitter.com/Jr2bxQIbCM

— 0xTanelPoder (@TanelPoder) May 3, 2021