× 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.





Thank you Scott .... it looks like I was just missing the step to set a breakpoint first.  I had all the other steps but that one.  I may try the F22 option as well.

As you can see, I don't get into debugging at this level all that often.

Rich Loeber
Kisco Information Systems
http://www.kisco.com
SDG
-------------------------

Quoting Scott Klement <midrange-l@xxxxxxxxxxxxxxxx>:

Hi Rich,

I'd like to run the source level debugger on a program other than the
main program.

I'm going to assume you mean a different module other than the entry
module.  (Because a *PGM object only contains 1 program...)

I'm assuming that you're using the green screen debugger, invoked via
STRDBG.  This is /not/ the only source-level debugger that IBM provides
-- and indeed, it's even possible to invoke a GUI debugger via the
STRDBG command, not just the green-screen one.

1) Run STRDBG PGM(your-program) before running your program. This should
show you the source code of your entry module.

2) Hit F14.  This will give you a list of the modules in the program.

3) Find the module you want to debug, and put 5=Display Module Source
next to that module.  Press ENTER.

4) You should now see the source code of the other module.  Set a
breakpoint where you want the debugger to stop.

5) Press F12 to return to the command line, and run your program.


Alternately, you can use F22=Step Into (this is Shift-F10) to step
line-by-line through the code.  The difference between F22 and F10 is
that when you press F22, it will step into a subprocedure call and show
you the code in that procedure (even if it's in a different module,
service program, or program).  Whereas F10 will only step within the
same routine (it will run the called procedure/program but it will not
step through it in the debugger like F22 does.)

So that's two alternatives... one where you set a breakpoint in the
particular procedure you want to debug, and another where you step into
the procedure you want to run.  Both should work.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.