How to debug piece of code added as CPYSRC

2900 pts.
Tags:
AS/400
AS/400 debugging
RPG2
Hi all,
My RPG2 program has some code included from a CPYSRC file (sub routine). According to my concept CPYSRC codes are copied as it is with the file. When I debug, my debugger do not enter in that sub routine. What should I do?
Thanks
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

I will sometimes compile the program to QTEMP to debug. Then you will get an expanded source QRPGLESRC in QTEMP with the copy source included. Then just debug this and you should be fine.

Forgot to mention to use the debug option *SOURCE

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • philpl1jb
    RPG2?? in AS/36 mode?
    54,090 pointsBadges:
    report
  • hunshabbir7
    I have compiled my code with debug view *LSTDBG, as it is required from ILE compiler for OPM source. Anyway how can I use QTEMP for it. Can you plz explain....Thanks
    2,900 pointsBadges:
    report
  • ToddN2000
    Do the following

    CRTOBJ OBJECT(QTEMP/MYPGM) OBJTYPE(RPGLE) DEBUGVIEW(*ALL)  SRCFILE(SRCLIB/QRPGLESRC)       

    This will create a source member in library QTEMP with the expanded source code. Then you would set up your debug.

    STRDBG PGM(QTEMP/MYPGM) UPDPROD(*YES)     

    Set your breakpoints and debug as usual.
    129,715 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: