Page 1 of 1

debug

Posted: Fri Aug 27, 2010 6:02 am
by jgreen
Is there a way to put an RPG program in debug mode?

Re: debug

Posted: Fri Aug 27, 2010 7:58 am
by t.s.h
If I understood you correct and you wish to debug a "browser session"
you could start a service job (STRSRVJOB) and than as usual start the debug (STRDBG) from the iSeries.
See here: http://profoundlogic.com/forums/phpbb3/ ... f=54&t=440

Re: debug

Posted: Fri Aug 27, 2010 9:51 am
by David
Yes, the referenced post is applicable. You need to use STRSRVJOB to use the source debugger as your application runs in a separate batch job.

An easy way to do this is to launch your Profound UI session like this:

For signed in sessions:

http://yourAS400:8080/profoundui/start.html?debug=1

For anonymous sessions:

http://yourAS400:8080/profoundui/start. ... gm&debug=1

The "debug" parameter name is case sensitive and should be given in lower case. When you launch a session in this way, you'll see that the job for the application is stopped in MSGW status. If you look at the message it contains the job name/user/number values needed for STRSRVJOB. After running STRSRVJOB and STRDBG, you can reply to the message with 'G' to let the job run.

Alternatively, you could just grab the values from a running job using "Work with Job", if you know which one you are dealing with.