Using the console and command line: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "__TOC__ <span class="f_Para">As macro development aids, the Debugger Client provides a console window and a command line dialog box. </span> === The Console === <span class=...")
 
No edit summary
Line 8: Line 8:
<span class="f_Para">To use the console: </span>
<span class="f_Para">To use the console: </span>


1. From the Client's </span><span class="term">Macros</span><span class="f_ListNum1"> menu, select </span><span class="term">Console</span><span class="f_ListBul1">.</span><span class="f_ListNum1"> </span>
: 1. From the Client's </span><span class="term">Macros</span><span class="f_ListNum1"> menu, select </span><span class="term">Console</span><span class="f_ListBul1">.</span><span class="f_ListNum1"> </span>
:: The </span><span class="term">Console</span><span class="f_ListContinue"> window opens. It remains open until you explicitly close it. </span>
:: [[File:macroconsole3a_zoom60.gif|394x307px|macroConsole3a]]


<span class="f_ListContinue">The </span><span class="term">Console</span><span class="f_ListContinue"> window opens. It remains open until you explicitly close it. </span>
: 2. [[Creating and running a macro|Invoke a macro]] or [[Client Command Reference|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. </span>
<span class="f_ListContinue"> </span>[[File:macroconsole3a_zoom60.gif|394x307px|macroConsole3a]]
:: The console's </span><span class="term">Print</span><span class="f_ListContinue"> and </span><span class="term">Save</span><span class="f_ListContinue"> buttons and </span><span class="term">File</span><span class="f_ListContinue"> menu options work the same as their  counterparts in the Client [[copying_printing_saving_text.html|Text Viewer]]. The </span><span class="term">Close</span><span class="f_ListContinue"> button closes the window. The search bar on the bottom of the window provides controls for searching the window content. </span>
 
:: You can also clear the window with the </span><span class="f_Monospace">[[clearMacroConsole command|clearMacroConsole]]</span><span class="f_ListContinue"> command, and you can close it with the </span><span class="f_Monospace">[[closeMacroConsole command|closeMacroConsole]]</span><span class="f_ListContinue"> command. </span>
2. [[Creating and running a macro|Invoke a macro]] or [[Client Command Reference|invoke command]]. </span>
 
<span class="f_ListContinue">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. </span>
 
<span class="f_ListContinue">The console's </span><span class="term">Print</span><span class="f_ListContinue"> and </span><span class="term">Save</span><span class="f_ListContinue"> buttons and </span><span class="term">File</span><span class="f_ListContinue"> menu options work the same as their  counterparts in the Client [[copying_printing_saving_text.html|Text Viewer]]. The </span><span class="term">Close</span><span class="f_ListContinue"> button closes the window. The search bar on the bottom of the window provides controls for searching the window content. </span>
 
<span class="f_ListContinue">You can also clear the window with the </span><span class="f_Monospace">[[clearMacroConsole command|clearMacroConsole]]</span><span class="f_ListContinue"> command, and you can close it with the </span><span class="f_Monospace">[[closeMacroConsole command|closeMacroConsole]]</span><span class="f_ListContinue"> command. </span>


'''Note:''' If you have the console open,<span class="f_Para"> [[displaying_variable_values.html|value displays]] appear</span><span class="f_Notes"> in the console instead of in a </span><span class="term">Value</span><span class="f_Notes"> window. To override this default, use the </span><span class="f_Monospace">valueDisplayOnConsole</span><span class="f_Notes"> option of the Client </span><span class="f_Monospace">[[setPreference command|setPreference]]</span><span class="f_Notes"> command. </span>
'''Note:''' If you have the console open,<span class="f_Para"> [[displaying_variable_values.html|value displays]] appear</span><span class="f_Notes"> in the console instead of in a </span><span class="term">Value</span><span class="f_Notes"> window. To override this default, use the </span><span class="f_Monospace">valueDisplayOnConsole</span><span class="f_Notes"> option of the Client </span><span class="f_Monospace">[[setPreference command|setPreference]]</span><span class="f_Notes"> command. </span>

Revision as of 18:03, 28 September 2022

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.