esrf

Beamline Instrument Software Support
SPEC Macro documentation: [ Macro Index | BCU Home ]

debugfile.mac
See other macros in category: Tools
Description:
    Macros to store debug information on a file.
Documentation:
    DESCRIPTION
    This macro set allows to store debug information in a file in a transparent mode to the user. The file is deleted each time the SPEC prompt is reached. Typical application is SPEC blocking during some device server access when one does not know the device being accessed and the error being hard to reproduce.

    SETUP
       The line debugfileon HAS TO BE in the setup.
       If it is called from the prompt the debug file
       will be deleted after each SPEC start not being
       able to recover the information of last crash.
    


Macros:
    debugfileon
    Usage: debugfileon [keep_file_on_exit_flag]
       This macro sets SPEC into debug 192 mode and
       adds hooks in prompt_mac and end_mac to store
       the debug information.
       If last time SPEC did not quit properly  the
       macro will refuse to be activated in order to
       keep the old debug file. Nevertheless, if one
       does not need the old debug file, one can first
       execute debugfileoff.
       If it desired to keep the debug file on normal
       SPEC exit it has to be executed with 1 as first
       argument.
    


    debugfileoff
    Usage: debugfileoff
       It deactivates the macros restoring debug 0 and
       removing the hooks.
    


Internal Macros:
    debug_fileon
    Usage: debug_fileon
       Implements a hook into prompt_mac
    


    debug_info
    Usage: debug_info
       This macro is called in prompt_mac.
       It deletes the debug file and opens it again.
       It calls savstate in order to store a variable
       (DEBUG_NON_STANDARD_END) that is used the next
       time SPEC starts.
    


    debug_inforesetup_end
    Usage: debug_inforesetup_end


    debugfile_end
    Usage: debugfile_end
       This macro is called by end_mac.
       It sets debug mode to 0 and deletes the debug file
       unless debugfileinfo was called with 1 as argument.
    


Filename: debugfile.mac
Author: V.A.Sole - BLISS - ESRF - Copyright 2002
Last mod.: 27/02/2008 17:44 by rey