× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Buck,

Where is the option to 'Terminate debug session on program completion'?



-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck Calabro
Sent: Thursday, November 03, 2016 3:13 PM
To: wdsci-l@xxxxxxxxxxxx
Subject: Re: [WDSCI-L] Newbie: debug a program running in batch

On 11/3/2016 1:53 PM, Dan wrote:
I wonder how much of the issue can be attributed to Eclipse vs. IBM.

So, I guess my cheat sheet for debugging in RDi is:
1) Exit RDi
2) Delete workspace
3) Start RDi
4) Set the SEP(s), ensuring correct object library and user ID
5) On the i, start a brand new job, ensuring correct library list (or
qualify your program call)

I don't do anything like that, and never did.

I have all my source members for the 'current fire of the moment' in a filter I create for the purpose. That filter is in a connection that has the correct library list, so if the code is in my test library, the library list for the connection is the test library list.

To start debugging, I right click, Debug > Set SEP. The defaults are all good because the filter is for the source in the library that I'm working with. Click OK.

On green screen, set the library list and CALL the program, or the CLP, or SBMJOB, or do whatever it is that will ultimately fire off the program. Yes, the program, library, and user need to match the things I just set in my SEP.

Program runs, RDi flips to Debug perspective and the program I am debugging is there.

Now look at the toolbar. There are some (ha!) icons for Resume, Suspend, Terminate, Step into, Step over, Step return. Green arrow facing right, 'pause' bars, red square, yellow curved arrows in various contortions pointing down. The one you may want to keep an eye on is that red square.

The first time you're done debugging, click that red square to terminate the debugger. Then the next CALL will re-enter the debugger. I needed this behaviour for something that now escapes me, but you can turn it off.

Even with all that, I find I'm still having problems. It appears that
the first call to PGMA is "caught" by the debugger (I have a
breakpoint set at the first executable statement), but subsequent
calls to PGMA in the same CL program stream are not. I just now
confirmed this by debugging in the green screen, which works properly.
I've wasted most of my day getting to this point. Not happy.

Preferences > Run/Debug > IBM i Debug

Select the option to 'Terminate debug session on program completion' and RDi will click that red button for you when the first CALL ends (and every one after as well).

About the only 'change' I had to make to my workflow to accommodate the SEP debugger was to click the 'Refresh' after a compile. That's it. I haven't used green screen debug in maybe 10 years and literally the only code I work on is green screen RPG.

--
--buck

Visit wiki.midrange.com and register for an account. Edit a page that helps you, and because it's public, you'll help someone else, too!

--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.