Using UltraEdit with the Debugger

From m204wiki
Revision as of 17:47, 25 April 2023 by Ekern (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

To use UltraEdit while debugging, you must configure a Janus FTP server in the Online as well as configure UltraEdit and the Debugger Client on your workstation. Once this is complete, you can use UltraEdit with the Debugger, as described above in Using a local editor.

Note: You can use any version of UltraEdit that supports FTP Open. The details provided below are for version 12.10b and later.

The configuration steps below are described in this section. They assume the Debugger installation has been completed and tested, as described in Product Installation.

  1. Set up a Janus FTP server in the Model 204 Online
  2. Set up UltraEdit
  3. Update the Debugger Client configuration file
  4. Test the configuration

Set up a Janus FTP server in the Model 204 Online

You must have the Janus Sockets product enabled, and you should refer to the "Janus FTP Server" chapter in the Janus Sockets Reference Manual.

The following steps provide a simple example of JANUS commands you can use to set up a Janus FTP Server configured to access the procedures in the MYPROCFILE file:

1. Create an FTP Server port with the JANUS DEFINE command:

JANUS DEFINE FTPULTRA portnum FTPSERVER 8  -       AUDTERM                                -       BINDADDR xxx.xxx.xxx.xx 

where portnum will be the TCP port number for accessing your FTP Server, and xxx.xxx.xxx.xx is the IP address on your Model 204 host to which the port is bound.
2. Create a mapping that provides FTP Write access to the procedure file.
The following example gives Write access to the file to all users, for the port defined in the previous step. The JANUS FTP command is described in the Janus Sockets Reference Manual.
In this example, MYPROCFILE is made the home folder, although it need not be (for example, if you already have a home folder set to something else).

JANUS FTP FTPULTRA ASSIGN /MYPROCFILE TO FILE MYPROCFILE  JANUS FTP FTPULTRA HOME   /MYPROCFILE TO ALL   JANUS FTP FTPULTRA ALLOW  /MYPROCFILE WRITE TO ALL 

3. Start the FTP Server port:

JANUS START FTPULTRA

4. Issue the following command, and verify that your port is defined and started:

JANUS STATUS

Set up UltraEdit

  1. Download and install a copy of UltraEdit on the workstation that hosts the Debugger Client.
  2. Start UltraEdit, and in the File menu, select FTP, then Open from FTP.
  3. From the FTP Open dialog, create an account that contains the information UltraEdit needs to access your procedure file via the Janus FTP Server you configured:
a. Click the Accounts button, and in the FTP/SFTP Account Manager dialog box, click the Add Account button:
UEftpAcct1a
b. Provide values for the fields that are displayed in the General tab:
Account Identifies this set of FTP connection values to UltraEdit, and you must also specify this value in the Debugger Client configuration file.
Protocol Leave the default value, FTP.
Server The DNS name of the Model 204 Online's host machine, or the IP address on your Model 204 host to which the Janus FTP port is bound (BINDADDR in the Janus FTP Server port definition).
Port Replace the default value (21) with the port number you specified in the Janus FTP Server port definition.
Username UltraEdit accesses Model 204 with this user ID and the Password value, below. Case does not matter.
Password The password for Username, above. Case does not matter.
User Account Any value specified here, or no value, is ignored by the Janus FTP Server.
Initial Directory Your initial location upon connecting to the FTP Server. This must correspond to a folder you specified including the forward slash ( / )  that precedes it in a JANUS FTP pname ASSIGN command in the setup of your Janus FTP Server. Case does not matter.
c. Click the Apply button, then click the OK button.
On the FTP Open page, your Account name displays in the Account drop down list, and your Initial Directory value displays below that list.
UEftpAcct2a
d. Test your FTP connection: select the Show Log checkbox, then click the Browse Site button.
The files in your procedure file should display in the central list box.
The FTP functions represented by the various buttons on the right side of the FTP Open dialog box are all operational (except for Create Dir and Permissions, which Janus FTP does not support), so be cautious if you experiment further in this dialog box. For more information about what these buttons do, see the UltraEdit online Help.
e. Select a default Transfer Type option: it will be associated with this account; then click the Cancel button to exit.
4. Close UltraEdit.

Update the Debugger Client configuration file

Once UltraEdit is installed and configured for debugging, you enable the Debugger(s) to invoke it by adding an entry to the Debugger Client configuration file (debuggerConfig.xml). This file is installed in the same directory as the Debugger Client executable file, and it is initially configured as part of the Debugger Client installation.

To update the file:

  1. Open the debuggerConfig.xml file in a text editor.
  2. Add an <editor> element (bounded by an <editor> start tag and an <\editor> end tag) at the same level (as a sibling of) the existing <serverList> element.
Include these <editor> subelements, and specify values for them as described in the Comment section below:
Subelement Comment
<program></program>

The identifier of the UltraEdit program executable file (case does not matter). For example: <program>uedit32</program>.

Note: If the Windows system variable Path does not include the folder path that points to the UltraEdit executable (for example, C:\Program Files\Ultra-Edit-32), either add it to the Windows variable now, or specify the folder path before the executable file name in the <program> value.

To locate the Path variable specification on a Windows 7 workstation, find the Control Panel (say, Start menu > Settings > Control Panel), then select System > Advanced system settings > Advanced tab > Environment Variables button > System variables > Path, then click Edit to see the full specification of the Path variable.

<account></account>

The name of the UltraEdit account you created to connect to the Janus FTP Server folder that contains the procedures you will be debugging. For example: <account>JALTEST</account>.

Note: This value is case sensitive; it must exactly match the value specified in UltraEdit.

When complete, your configuration file should have a structure like the following:

<debuggerConfig version="1.0">    <serverList>        .        .        .    </serverList>    <proxy>        .        .        .    </proxy>    <editor>       <program>uedit32</program>       <account>JALTEST</account>    </editor>        .        .        . </debuggerConfig> 

3. Save and close the file.

Test the configuration

1. Restart the Debugger Client.
2. Load a procedure in the Source Code tab of the Debugger Client:
  • Janus Debugger: From your web browser, invoke a URL that includes a procedure.
  • TN3270 Debugger: Issue the TN3270 DEBUG ON command; then include a procedure from the Model 204 command line.
3. Right click a line of code, select Line Information from the context menu, then click the Edit button on the pop up that opens.

UltraEdit should open, displaying in its working area the procedure that contains the code line that you right clicked. If it fails to do so, and you verified earlier that, by itself, UltraEdit successfully transfers files from the FTP Server, begin your troubleshooting in the Debugger Client debuggerConfig.xml file settings for the <editor> element.  

Note: UltraEdit 12.10a versions open the procedure to line 1 in your procedure code. 12.10b and later versions, as well as 12.0x versions, open the procedure to the same line number as that from which you invoke the edit in the Debugger Client.