Using the console and command line

From m204wiki
Revision as of 03:56, 29 November 2022 by Ekern (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

As macro development aids, the Debugger Client provides a console window and a command line dialog box.

The Console

The Console is an independent window that logs informational, error, and trace messages from the Debugger macros (and Client commands) that you run.

To use the console:

1. From the Client's Macros menu, select Console.
The Console window opens. It remains open until you explicitly close it.
macroConsole3a
2. Invoke a macro or invoke command.
The console window moves to the top of the window stack and displays information about the macro or command, including its starting and stopping, as well as any error messages.
The console's Print and Save buttons and File menu options work the same as their  counterparts in the Client Text Viewer. The Close button closes the window. The search bar on the bottom of the window provides controls for searching the window content.
You can also clear the window with the clearMacroConsole command, and you can close it with the closeMacroConsole command.

Note: If you have the console open, value displays appear in the console instead of in a Value window. To override this default, use the valueDisplayOnConsole option of the Client setPreference command.

The Command Line

The Command Line dialog box provides a command line interface for running macros and commands. This utility is an alternative to the Macros menu Run Macro option or to a button or hot key combination; it stays available unless explicitly closed, so it is a step-saver for macro testing. In addition, this interface will invoke a Client command if no same-named macro exists.

To use the command line tool:

  1. Consider opening the Console window (from the Client's Macros menu) to display information about the macros or commands you run.
  2. From the Macros menu, select Command Line.
The Command Line dialog box opens. It remains open until you explicitly close it.
macroCmdline1a
3. Enter the name of a macro or command, and specify its required arguments, if any.
The extension .macro after a macro name is optional, as is a preceding Macro keyword (case not important). The Command keyword directs the Client to look exclusively for a command that has the name you are specifying.
For a macro, the Client looks for the macro file in the same folder as the JanusDebugger.exe file, by default.
Use one or more blanks to separate arguments from each other and from the macro or command name. If you provide more arguments than are required, the extra characters are ignored.
4. Click the Run button to execute the named macro or command.
Clicking Cancel closes the command line dialog box.
5. If during your session you run many macros and commands, you can easily review them or repeat an earlier one by scrolling through their history using you keyboard up/down arrow keys.