From YiPs Wiki (i powered)

Java: System Debugger

(click to open)

Quick Page Table of Contents

Scanning…

GUI Debugger shipped with IBM i

Many people run this GUI debugger for easy RPG/C program debug. I am not advocating for any debugger, but this one just happens to be included with Java already installed on IBM i (no hassle to find), and i find it fairly easy to use over webex sessions debugging on customer machines.

GUI debug from laptop to IBM i (2-tier)

This is how most debug sessions are used laptop to IBM i.

Download from IBM i directories and install in any path on laptop (PC) …

/QIBM/ProdData/HTTP/Public/jt400/lib/tes.jar
/QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar

… run debugger from laptop

Windows: java -classpath C:\path\tes.jar;C:\path\jt400.jar utilities.DebugMgr &
Linux:   java -classpath java -classpath /path/tes.jar:/path/jt400.jar utilities.DebugMgr &

1) After you have utilities.DebugMgr started use Edit->add system to connect to your system (it will remember)
2) Debug your PGM/SRVPGM or running process (right click on system)

OPTIONAL: GUI pop-ups from green screen STRDBG …

After you have utilities.DebugMgr started and you are connected
to your IBM i machine (Edit->add system), you MAY want GUI debug 
to 'magically' pop up GUI debug from green screen STRDBG (yes it does) ...
Example:
0. Turn off laptop IP check ...
   ADDENVVAR ENVVAR(QTES_VALIDATE_IP) VALUE(0)
1. From the RPG job:
   a. ===> DSPJOB
   b. Get the Name, User and Number-you will need this in the next step (*)
2. From the debugging job:
   a. ===> STRSRVJOB JOB(Number/User/Name)
   b. ===> STRDBG yourRpgPgm
   c. ===> Exit with F10.
3. From the RPG job, call your program.
4. Go back to the debugging job to step through your program.
5. From the debugging job:
   a. ===> ENDDBG
   b. ===> ENDSRVJOB JOB(whatever)

(*) Another, maybe easier, way to get the job info is to do WRKJOB
OPTION(*SPLF) in the RPG job, and do a 2 on one of the spoolfiles.  Then
use cut-and-paste on all three job fields at once from the spoolfile to
the prompted STRSRVJOB command.

GUI debug natively on IBM i (1-tier-ish)

For folk that “do everything native on IBM i”, this works via PASE X graphics to any X capable machine Linux, Mac … and Widows (Cygwin or VNC) … besides really fun to watch people shake head disbelieving as IBM i is doing practical graphics.

Use X windows …

… and IBM i must allow graphics (X) …

1) Enable X Windows forwarding by editing the sshd_config file to enable X11Forwarding yes:
 on V5R3 or V5R4:
   /QOpenSys/QIBM/UserData/SC1/OpenSSH/openssh-3.5p1/etc/sshd_config
   X11Forwarding yes
 on V6R1:
   /QOpenSys/QIBM/UserData/SC1/OpenSSH/openssh-3.8.1p1/etc/sshd_config
   X11Forwarding yes
 -- or whatever version we are sshd on your IBM i --

2) Start sshd server side (i5/OS):
 on V5R3 or V5R4:
   CALL QP2TERM
   >/usr/sbin/sshd &
 on V6R1:
   STRTCPSVR *SSHD

3) Initiate ssh connection from client side (linux works very well):
 >ssh -X myi5 (ssh -Y if "bad atom" or graphics problems)
 -- or --
 >ssh -X myuserid@myi5.xxx.org (if your PC is not same user name)

…Run on PASE (no download)

 
PASE (ssh -X myid@myibmi): 
java -classpath /QIBM/ProdData/HTTP/Public/jt400/lib/tes.jar:/QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar -Dos400.awt.native=true utilities.DebugMgr &

1) After you have utilities.DebugMgr started use Edit->add system to connect to your system (it will remember)
2) Debug your PGM/SRVPGM or running process (right click on system)
Retrieved from http://youngiprofessionals.com/wiki/index.php/Java/SystemDebugger
Page last modified on April 05, 2012, at 04:58 PM EST