Debugging Inspection(Gadgets)
I am trying to write my own inspection (and cheating by looking at InspectionGadgets).
While doing this I found a bug in ThreadPriorityInspection (it fails to recognize
NORM_PRIORITY when that field is used without qualifier, i.e. imported statically).
I tried to reproduce this behavior in my own inspection (which is pretty similar), but
I cannot debug my code, due to the the behavior described here:
http://www.intellij.net/forums/thread.jsp?forum=13&thread=86587&message=1435217
Yet, I don't see that InspectionGadgets is using any of the runread/WriteAction or
invokeNow/Later()?
It seems naturaly to me that inspections read PSI, and the inspections seem to run fine
when not debugged, so what's going on here?
I tried to switch off the toString() display in the debugger, but that does not help.
请先登录再写评论。
Stephen, try to run your plugin with the following system-property set:
-Didea.ProcessCanceledException=disabled
which can help a lot when debugging PSI-plugins (IDEADEV-3912)
Sascha
Thanks a lot Sascha!
Just curious: so when inspections run "for real", they stop with an exception as soon as Idea looses focus, right?
Hi Stephen,
Good catch. I have a fix, which should appear in the next build (or at least soon).
Bas