I'm currently trying to upgrade the Saxon dependency in XmlBeans
and found a few bugs in the XmlBeans-Dom implementation.
To find out where the error was/is, I'm comparing the calls with
the Xerces Dom.
As I was struggling solely with the debugger, I've looked for a
method on tracing the calls and I'm using btrace  now.
So in my IntelliJ config, I'm simply adding the VM paramters 
and before running you need to compile the btrace script  with
There are some limitations with btrace and not all methods can be
instrumented, e.g. methods with synchronizations, but overall I
get a good idea, when the call chain differs when comparing the
btrace output with Xerces/Jaxp.