Debugging Tasks with
See also the Doxygen documentation on lsstDebug.
Refer to the task documentation and look for “debug variables” to discover what debugging options are available for existing
Your goal is to customize the behaviour of
debug to meet your particular needs by redefining the
lsstDebug.Info function to return an object that returns non-
False values for certain combinations of
__name__ and attribute.
In order to load your specific debugging configuration, create a
debug.py in a directory that is already in your
PYTHONPATH or a new directory that you add to your
PYTHONPATH, and put something like this in it:
import lsstDebug def DebugInfo(name): debug = lsstDebug.getInfo(name) if name == "lsst.meas.astrom.astrometry": debug.display = True return debug lsstDebug.Info = DebugInfo
That should enable debugging the
display attribute when you are running inside
lsst.meas.astrom.astrometry, and disable it elsewhere.
Of course, you can also return arbitrarily more complex objects, doing things like specifying the frame to display on etc.
You must use the
--debug command line argument to ask a command line task to import your