I keep dumping whatever debugging ideas occur in http://www.customware.net/repository/display/WMFAQ/Home
I quite like being able to save/load/modify/drop values from the pipeline in developer without having to change code. Useful when you want to simulate something breaking or returning a bad value.
Useful is to use tracepipeline with scope if you want to print out some document structure but have too much other mess in the pipeline.
In terms of using find dependents:
- bytesToString and StringToBytes for encoding issues (e.g. to/from japanese or something)
- restorePipelineFromFile (sign of bad coding practice if it’s ever in “real” services)
-if a certain service is throwing an exception in the logs, using find dependents usually narrows it down.
Bit more hacky: If you’re working with services that have soemthing other than String/IData/Integer/Float/Doubles Objects on the pipeline that show up as nulls when they actually have data in them: try adding that class to the classpath for the developer. That way the Developer will be able to show the toString() result for the Object which is probably more useful than “null”.
Java services when doing a bit of quick debugging I sometimes put a throw new ServiceException(“debug stuff here”) in certain cases. Other times I create a String that I add a bunch of things to then output in the pipeline. Anything too complicated I use an IDE and rig up a simple test harness.
A good one to find the SQL for an adapter service is to add in an extra parameter that you don’t have a “?” for… This will throw an exception containing the SQL so you can have a look at it (more practical than digging through logs set to some ridiculously high debug level).
Runaway services I like being able to kill it by reloading the package.
Oh and of course: WmUnit (new release yesterday) automated tests for catching all the stupid things when changing code…