SIRIUS DEBUG, SIRDEBUG, or SIRIUSDEBUG command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 8: Line 8:
The general form of the command is:
The general form of the command is:
===Syntax===
===Syntax===
  SIRDEBUG {ON onParams | OFF | SUSPEND | RESUME | STATUS | CLIENTCOMMAND cmdStr}
<p class="syntax"><span class="literal">SIRDEBUG</span> <span class="squareb">{</span><span class="literal">ON</span> <span class="term">onParams</span> <span class="squareb">|</span> <span class="literal">OFF</span> <span class="squareb">|</span> <span class="literal">SUSPEND</span> <span class="squareb">|</span> <span class="literal">RESUME</span> <span class="squareb">|</span> <span class="literal">STATUS</span> <span class="squareb">|</span> <span class="literal">CLIENTCOMMAND</span> <span class="term">cmdStr</span><span class="squareb">}</span> </p>


Where:
Where:

Revision as of 14:04, 24 May 2012

Starts and stops the Sirius Debugger (for debugging 3270, BATCH2, or other non-web applications), and can also be used for debugging programs served by Janus Web Server threads. Connects to a Debugger Client on a workstation, from where debugging is orchestrated via the Client GUI.

The commands SIRIUSDEBUG, SIRDEBUG, and SIRIUS DEBUG are interchangeable, and a mixture of them is used on this page. The general form of the command is:

Syntax

SIRDEBUG {ON onParams | OFF | SUSPEND | RESUME | STATUS | CLIENTCOMMAND cmdStr}

Where:

  • The ON subcommand starts a Sirius Debugger session (it requires additional parameters). It can also be used for debugging Janus Web Server threads.
  • The OFF subcommand stops a debugging session.
  • The SUSPEND and RESUME subcommands discontinue and continue a debugging session.
  • The STATUS subcommand gets a status report about the worker threads for the Janus Debugger, the Sirius Debugger, or both.
  • The CLIENTCOMMAND subcommand sends a command to the Debugger Client (it requires additional parameters).

This command will perform no useful processing unless a site is authorized for the Sirius Debugger (and for Janus Web threads, Janus Debugger). For more information, see the Janus/Sirius Debugger User's Guide.

SIRIUS DEBUG ON

To initiate a Sirius Debugger session, you issue the SIRIUS DEBUG ON command from the Model 204 command prompt or within a BATCH2 input stream. The command requires the parameters described below that identify the network ports and the workstation used in your debugging session. The values of these parameters are established during product installation:

SIRIUS DEBUG ON [*|janClientPort [.|pcHost [pcPort [workerPort]]]]

where:

janClientPort
The name of the Janus client socket port that is defined for the Sirius Debugger to use to contact the Debugger Client workstation. As of Sirius Mods version 7.9, the default value is an asterisk (*), which means to use a Janus port whose definition includes the MASTER parameter. Such a port can be accessed on a Debugger connection request without specifying its port name on the SIRIUS DEBUG ON command. This port must be started.
pcHost
The workstation running the Debugger Client. This may be an IP number or a DNS name, as described during product installation. As of Sirius Mods version 7.9, the default value is a period (.), which means to use the IP address of the machine on which the SIRIUS DEBUG ON command is issued.
pcPort
The workstation port number on which the Debugger Client is listening. As described during product installation, this is typically 8081. As of Version 7.0 of the Sirius Mods, the Model 204 User 0 parameter SDEBGUIP sets the default value of this port. Valid values for this parameter, which is also resettable by the system manager, range from 0 to 65535. If 0, no default is set, and the parameter's value must be explicitly specified in the SIRIUS DEBUG ON command. A VIEW SDEBGUIP command returns the current setting of SDEBGUIP. Note: As shown in an example below, to omit an explicit specification of pcPort (letting it default to the setting of SDEBGUIP) but still provide an explicit value for workerPort, use an asterisk (*) for the missing pcPort specification to indicate the respective position of the parameter values.
workerPort
The port number in your Online that is defined for worker threads. This can be the same port number that provides worker threads for the Janus Debugger, as well. As of Version 7.0 of the Sirius Mods, the Model 204 User 0 parameter SDEBWRKP sets the default value of this port. Valid values for this parameter, which is also resettable by the system manager, range from 0 to 65535. If 0, no default is set, and the parameter's value must be explicitly specified in the SIRIUS DEBUG ON command. A VIEW SDEBWRKP command returns the current setting of SDEBWRKP. For example:

SIRIUS DEBUG ON DEBCLIENT 198.242.244.235 8081 3226

After issuing the command, you receive a message similar to this:

*** MSIR.0915: Debugging is on; client is 198.242.244.235 port 8081, sessionID: 00000069D812279

If you had set the workstation and worker port numbers with the SDEBGUIP and SDEBWRKP User 0 parameters, as revealed by a VIEW command:

VIEW SDEBGUIP,SDEBWRKP

SDEBGUIP 8081 SIRIUS DEBUG DEFAULT GUI PORT NUMBER SDEBWRKP 3226 SIRIUS DEBUG DEFAULT WORKER PORT NUMBER

The previous DEBUG ON command could be simplified:

SIRIUS DEBUG ON DEBCLIENT 198.242.244.235

In this case, you receive different confirmation messages:

*** MSIR.0942: Sirius Debugger GUI port defaulted to 8081 *** MSIR.0942: Sirius Debugger Worker port defaulted to 3226 *** MSIR.0915: Debugging is on: client is 198.242.244.235 port 8081, sessionID: sessionID: 00000069D812279

You can also use asterisks to indicate that the port defaults are to be taken. These two commands are equivalent:

SIRIUS DEBUG ON DEBCLIENT 198.242.244.235 * * SIRIUS DEBUG ON DEBCLIENT 198.242.244.235

You receive an error message if you use either of the above commands without having set the default port values. To take the GUI port default but specify a value for the worker port, you must use an asterisk in the GUI port position:

SIRIUS DEBUG ON DEBCLIENT 198.242.244.235 * 3226

You can further simplify the connection command by taking advantage of the janClientPort and pcHost parameter defaults (added in Sirius Mods 7.9). If the DEBCLIENT port is defined with the MASTER parameter, and SDEBGUIP and SDEBWRKP are as above, these commands are equivalent:

SIRIUS DEBUG ON * . SIRIUS DEBUG ON

On the Debugger Client, Connection from Online displays in the Status bar after the DEBUG ON command is issued. This indicates that the Debugger is "on" and awaiting the next program to debug.

After the command runs successfully, any User Language program you initiate from the Model 204 command line will appear in the Source Code tab of the Debugger Client GUI for debugging.

SIRIUS DEBUG CLIENTCOMMAND

Available as of version 7.8 of the Sirius Mods, SIRIUS DEBUG CLIENTCOMMAND lets you send a command string to be executed by the Debugger Client. The parameter of SIRIUS DEBUG CLIENTCOMMAND is the command string you want to send. If it contains more than one word, enclose it in apostrophes.

SIRIUS DEBUG CLIENTCOMMAND cmdStr

Examples:

SIRIUS DEBUG CLIENTCOMMAND clearWatch SIRIUS DEBUG CLIENTCOMMAND 'Addwatch %watchthis' SIRIUS DEBUG CLIENTCOMMAND 'Macro mymacro %s'

If the Sirius Debugger is not currently in a session, issuing SIRIUS DEBUG CLIENTCOMMAND has no effect and receives a harmless error message.

You can also send a command string to be executed by the Debugger Client with the DebuggerTools, ClientCommand, and Command methods.