How to debug "internal error" during yang file compilation using confdc?

I am using “confdc -c” to compile my yang files. When reach to one yang file, it prints out “internal error”.
I checked “confdc -h” but didn’t find some options I can enable to do further investigation. In current case, any option/ logs I can check to get more information why there are internal error ?

Thanks in advance.

“internal error” is the default error message from confdc. It either means just that, the compiler encountered some internal error (bug in the compiler itself) or an issue with your YANG model where the compiler doesn’t provide a more specific error message.

The best way to figure what confdc doesn’t like, is to comment out statements in your YANG-file until you figure out which statement caused the compiler to trip over.

Thank you very much.
I am expecting there may be logs that I can check to have more details. But looks like not, I will try to comment out statements to see.

In Confd version 7.3.3, stuck with “internal error” while compiling a yang file. Then I surprised to see the successful compilation, if current() keyword is removed from ‘when’ statement. Please have a look at the patch diff below & provide explanation for it:

when "
- not(derived-from-or-self(current()/…/…/if:type,
+ not(derived-from-or-self(…/…/if:type,
‘if-aug:loopback’)) ";

To be note, the same was working fine in earlier version.