<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://m204wiki.rocketsoftware.com/index.php?action=history&amp;feed=atom&amp;title=Debugging_the_TN3270_Debugger</id>
	<title>Debugging the TN3270 Debugger - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://m204wiki.rocketsoftware.com/index.php?action=history&amp;feed=atom&amp;title=Debugging_the_TN3270_Debugger"/>
	<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Debugging_the_TN3270_Debugger&amp;action=history"/>
	<updated>2026-05-08T17:37:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Debugging_the_TN3270_Debugger&amp;diff=119956&amp;oldid=prev</id>
		<title>Ekern: Created page with &quot;Whenever you invoke a User Language program from an Online that has been configured for debugging, this sequence of events unfolds:   : 1. &lt;span class=&quot;f_ListNum1&quot;&gt;The initial...&quot;</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Debugging_the_TN3270_Debugger&amp;diff=119956&amp;oldid=prev"/>
		<updated>2023-05-25T21:37:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Whenever you invoke a User Language program from an Online that has been configured for debugging, this sequence of events unfolds:   : 1. &amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;The initial...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Whenever you invoke a User Language program from an Online that has been configured for debugging, this sequence of events unfolds: &lt;br /&gt;
&lt;br /&gt;
: 1. &amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;The initial user call to start the TN3270 Debugger (&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;f_Monospace&amp;quot;&amp;gt;SIRDEBUG ON DEBCLI1 198.242.244.16 8081 3270&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt; in the &amp;lt;/span&amp;gt;&amp;lt;var&amp;gt;SirScan&amp;lt;/var&amp;gt;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt; example lines below, which is [[Test the end to end configuration#TN3270 Debugger |described]] as part of the product installation) triggers a socket connection request from the issuing user&amp;#039;s thread (using the CLSOCK port [[Define and start a client socket port (TN3270 Debugger only)|defined]] during installation) to the workstation that hosts the Debugger Client. The connection request (trace lines for which are circled below) contains the number of the Debugger Server port (configured during [[Define and start the Debugger Server port|installation]]) and the user thread number. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:sirwork1a1b_zoom65.gif|700x169px|sirWork1a1b]]&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: 2. &amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt;Once the connection succeeds, the Debugger Client, in turn, connects to that Debugger Server port, which starts a &amp;lt;/span&amp;gt;&amp;lt;var&amp;gt;SirScan&amp;lt;/var&amp;gt;&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt; thread whose default user ID is SOCKUSER (see top two &amp;lt;/span&amp;gt;&amp;lt;var&amp;gt;SirScan&amp;lt;/var&amp;gt;&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt; lines, below). &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;The Debugger Server communicates over a socket connection with the Client and creates a worker thread for this debugging session. The connection handshake contains a unique ID from the Client for this debugging session (circled, below). The Server worker thread uses AUDIT statements to report its activities to the &amp;lt;/span&amp;gt;&amp;lt;var&amp;gt;SirScan&amp;lt;/var&amp;gt;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt; audit trail. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:sirworka1bb_zoom65.gif|869x305px|sirworkA1bb]]&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: The worker thread reports its actions in lines that begin with three asterisks (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;***&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt;). The worker refers to the Online thread to be debugged as the &amp;amp;quot;debuggee.&amp;amp;quot; A successful connection between the Debugger Server and Debugger Client results in a &amp;amp;quot;Debugging is on&amp;amp;quot; message, and the ID referred to in the connection handshake becomes the &amp;amp;quot;session ID&amp;amp;quot; for this debugging session:  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:sirworka2a_zoom65.gif|764x61px|sirworkA2a]]&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: 3. &amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;The worker thread is directed by the Debugger Client (based on user interface actions), and the worker thread maintains an internal master/slave, post/wait relationship with the Online thread that is being debugged. The initial action of the worker thread is to announce itself to the Debugger Client in the &amp;lt;/span&amp;gt;&amp;lt;var&amp;gt;Audit Trail&amp;lt;/var&amp;gt;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt; page: &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:sirdebworker3acli2_zoom75.gif|616x378px|sirdebworker3acli2]]&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: 4. &amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;The worker then waits for the Online thread to initiate debuggable activity. If you include a &amp;lt;/span&amp;gt;&amp;lt;var&amp;gt;SirScan&amp;lt;/var&amp;gt;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt; procedure from the Online thread, for example (DAEMON5.UL in the &amp;lt;/span&amp;gt;&amp;lt;var&amp;gt;SirScan&amp;lt;/var&amp;gt;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt; excerpt below), the worker detects this and pauses procedure processing while it sends the code lines to the Client (in an XML document) using the DEBCLI1 CLSOCK port, then waits for a response from the Client. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039;&amp;lt;span class=&amp;quot;f_ListNote&amp;quot;&amp;gt; The format of the XML messages in the following and subsequent code examples in this section is unpublished and subject to change. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:sirdebworker2cli3s1_zoom65.gif|632x252px|sirdebworker2cli3s1]]&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:sirdebworker2cli3a2_zoom65.gif|634x371px|sirdebworker2cli3a2]]&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: 5. &amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;The Client displays the procedure code in the Debugger &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;f_GUIlabel&amp;quot;&amp;gt;Source Code&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt; page: &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:sirdebworker3bcli2_zoom75.gif|519x544px|sirdebworker3bcli2]]&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: 6. &amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;The Client user initiates the next round of activity by invoking an operation on the source code, say, stepping to the next statement. The Client sends this command in an XML message to the worker (upper circle, below), and the worker wakes up and instructs the Online thread. The worker reports a sequence of &amp;amp;quot;***&amp;amp;quot; audit lines (the ending &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;N&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;&amp;#039;s below mean &amp;amp;quot;run to &amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;ext statement&amp;amp;quot; and &amp;amp;quot;&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;ext statement executed&amp;amp;quot;), then sends an XML response to the Client (lower circle, below) about the result of executing the next statement in the program: &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:sirdebworker2cli5a_zoom65.gif|635x431px|sirdebworker2cli5a]]&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: 7. &amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;The Client-worker-Online communication continues in this fashion according to the commands invoked by the Client GUI user. The worker continues in a loop/dialogue with the Client, reporting its state and latest activity to the Client, and receiving  XML requests from the Client (commands that are based on what the Debugger GUI user is invoking). The worker also maintains a master-slave relationship with the Online thread, guiding the execution of the program and reporting execution results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: 8. &amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;In case you need to debug the Debugger, you can access the XML traffic exchanged between the worker and Debugger Client. To do so, use the JANUS TRACE command (described in the &amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;Janus TCP/IP Base Reference Manual&amp;#039;&amp;#039;&amp;#039;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt;) to increase the tracing on the Debugger Server port (in this example, DEBUGSERVER3270) and on the Online&amp;#039;s client socket port (in this example, DEBCLI1), and use &amp;lt;/span&amp;gt;&amp;lt;var&amp;gt;SirScan&amp;lt;/var&amp;gt;&amp;lt;span class=&amp;quot;f_ListNum1&amp;quot;&amp;gt; to view the traffic. The JANUS DISPLAYTRACE command reveals the current trace values. &amp;lt;/span&amp;gt;&lt;br /&gt;
: Since a high tracing value, say &amp;lt;span class=&amp;quot;f_Monospace&amp;quot;&amp;gt;15&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt;, can capture huge amounts of data, remember to return the tracing settings to their former values when you no longer need so much detail. &amp;lt;/span&amp;gt;&lt;br /&gt;
: Also of possible use in a debugging situation, the Debugger Client installation folder is the [[Changing the location of Client work files|default location]] for a text log (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;log.txt&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;f_ListContinue&amp;quot;&amp;gt;) of Client activity and reference file information. &amp;lt;span id=&amp;quot;log_client_sd&amp;quot; class=&amp;quot;hmanchor&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Debugger Home]]&lt;/div&gt;</summary>
		<author><name>Ekern</name></author>
	</entry>
</feed>