Using the Macro Autorun feature

From m204wiki
Jump to navigation Jump to search

The Client lets you automatically run a particular macro whenever you debug a particular procedure. Such a macro might set watches and breakpoints tailored to aid the debugging of that procedure. This Macro Autorun feature requires simply that the macro have the same name as the procedure, and it works only for procedures that are included from command level (level 0), that is, not from within a procedure (level 1).

By default, the feature is initially not enabled.  To use the feature:

  1. For a procedure that you debug somewhat frequently, define a macro that sets up the debugging environment you want for that procedure.
  2. Give the macro the same name as the procedure. Character case is not important.
  3. Open Preferences.
  4. In the Execution Options section of the Preferences dialog, select the Macro Autorun checkbox, which is clear by default.
  5. Include the procedure, for example via the URL of your Janus Web application.
    Note: The Client setPreference command has an option that lets you toggle the Macro Autorun checkbox.
The Debugger searches in the Debugger installation folder or any alternative folders you may have specified for a .macro file that has the same name as the procedure. If such a file is found, it is run.  If a same named macro is not found, no action is taken.