Using the console and command line: Difference between revisions
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 14: | Line 14: | ||
: 2. [[Creating and running a macro|Invoke a macro]] or [[Client Command Reference|invoke command]]. | : 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> | :: 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> | ||
:: 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 [[ | :: 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, or saving text|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> | :: 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"> [[ | '''Note:''' If you have the console open,<span class="f_Para"> [[Displaying temporarily the value of a program data item|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> | ||
=== The Command Line === | === The Command Line === | ||
Line 24: | Line 24: | ||
<span class="f_Para">To use the command line tool: </span> | <span class="f_Para">To use the command line tool: </span> | ||
# Consider opening [[ | # Consider opening [[Using the console and command line#The Console|the Console window]] (from the Client's <span class="term">Macros</span> menu) to display information about the macros or commands you run. | ||
# From the <span class="term">Macros</span> menu, select </span><span class="term">Command Line</span>. | # From the <span class="term">Macros</span> menu, select </span><span class="term">Command Line</span>. | ||
: The <span class="term">Command Line</span> dialog box opens. It remains open until you explicitly close it. | : The <span class="term">Command Line</span> dialog box opens. It remains open until you explicitly close it. | ||
[[File:macrocmdline1a_zoom60.gif|371x95px|macroCmdline1a]] | :: [[File:macrocmdline1a_zoom60.gif|371x95px|macroCmdline1a]] | ||
3. Enter the name of a macro or command, and specify its required arguments, if any. | : 3. Enter the name of a macro or command, and specify its required arguments, if any. | ||
: The extension <var>.macro</var> after a macro name is optional, as is a preceding </span><var>Macro</var> keyword (case not important). The <var>Command</var> keyword directs the Client to look exclusively for a command that has the name you are specifying. | :: The extension <var>.macro</var> after a macro name is optional, as is a preceding </span><var>Macro</var> keyword (case not important). The <var>Command</var> 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 <var>JanusDebugger.exe</var> file, [[ | :: For a macro, the Client looks for the macro file in the same folder as the <var>JanusDebugger.exe</var> file, [[Changing the location of Client work files|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. | :: 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 <span class="term">Run</span> button to execute the named macro or command. | : 4. Click the <span class="term">Run</span> button to execute the named macro or command. | ||
: Clicking <span class="term">Cancel</span> closes the command line dialog box. | :: Clicking <span class="term">Cancel</span> 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. | : 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. | ||
[[Category:Debugger Home]] | [[Category:Debugger Home]] |
Latest revision as of 03:56, 29 November 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.
- 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:
- Consider opening the Console window (from the Client's Macros menu) to display information about the macros or commands you run.
- From the Macros menu, select Command Line.
- The Command Line dialog box opens. It remains open until you explicitly close it.
- 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.