You cannot set any debug for JMX collection. Some information is written in the log of the agent (basically in the java directory of oneagent logs) since the JMX data collection happens in the monitored Java process itself.
But I agree it can be frustrating. Wait for Dynatrace Managed 1.162 (end of february) which should already have JMX Plugin Editor which is amazingly helpful.
You can't. I'm just saying it is much easier to create the plugin with the JMX Plugin editor as it will generate a proper plugin JSON file. You can browse real JMX MBeans and you can't make a typo in selecting MBeans and you can also validate those MBeans exists on monitored processes.
So any alternative of creating it because i created a json file and validated it with the monitored processes. The attribute and the domain are okay ,the plugin is detected by the processes but doesn't return the metrics specified on the plugin.