Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to debug custom taglets?

david.karrJul 12 2017

I am attempting to write a custom taglet that emits a table of information about any javax.validation constraints in the enclosing class. I'm actually making progress on the implementation, to the point where I'm refining the information I get from the validator infrastructure.

However, what is really annoying is that the only way I can debug my implementation is by adding print statements.  There appears to be no obvious way to get to a point where I can step through my code in a debugger.

I found the "ToolProvider.getSystemDocumentationTool()" call, which at lets me run javadoc from a test class, but that just forks a process.  I suppose there is the "-J" command-line option.  Is my only choice to pass the "-Xdebug" and related options through this, and then run a remote debugger to connect to that port?  I tried passing "-J-Xdebug" as one of the parameters to the "run()" method, but that fails with "javadoc: error - invalid flag: -J-Xdebug".

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 9 2017
Added on Jul 12 2017
0 comments
250 views