View previous topic :: View next topic |
Author |
Message |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Mon Jul 19, 2021 6:08 am Post subject: Debug tool and skipping code |
|
|
I looked in the manual, but I'm guessing this is not supported.
In Xpediter, I can specify the prefix command S so as to skip lines of code that I don't want to be executed. (an example of this might be if I have old and new code in the same program. I might want to skip all calls to the old code while testing the new and vice-versa).
In debug tool, the only option I've found is along the lines of putting a breakpoint on the unwanted lines and then doing a J(ump) to the line(s) I want to execute.
Is this the only way? _________________ Michael |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Mon Jul 19, 2021 8:13 am Post subject: |
|
|
I'm not sure that's what I'm after. Based on the first link
Quote: | The source markers provide a way to select the source lines that are to be marked in the report file and called out in the statistics calculation for code coverage |
strikes me as simply including/excluding which lines are used as the basis for various stats/reports.
What I mean (and I don't think this is the same) is a simple way of marking a line such that it isn't executed when debugging. For example
Code: | move 1 to a
move 2 to b
move 3 to c |
Now, since this is a pretty stupid example, I want a simple way of debugging the program and marking the b line so that it isn't executed.
I'm not interested in code coverage or reports, just a simple method to run (normally) ALL the lines of code except for the b line. _________________ Michael |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Jul 19, 2021 8:59 am Post subject: |
|
|
misi01,
Did you check the 2nd link ? _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Wed Jul 21, 2021 5:50 am Post subject: |
|
|
Quote: | Did you check the 2nd link ? |
Yes, I did, but it feels as if we're talking at x-purposes. Your links seem to be all about the report contents of code coverage.
I'm simply asking if there is a simple way to mark lines such that they are not executed in the debug session. I'm not in the slightest bit interested in any code coverage reports. _________________ Michael |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Jul 21, 2021 11:10 am Post subject: |
|
|
misi01 wrote: |
Yes, I did, but it feels as if we're talking at x-purposes. Your links seem to be all about the report contents of code coverage.
I'm simply asking if there is a simple way to mark lines such that they are not executed in the debug session. I'm not in the slightest bit interested in any code coverage reports. |
Sigh ! _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Thu Jul 22, 2021 4:31 am Post subject: |
|
|
A simple question - can I skip lines of code when debugging or not.
Xpediter allows you to enter the prefix command S on the lines you want to skip.
Maybe (and I haven't found it) the command is something like skip 1200-1205 or similar.
If the answer is based on the links you pointed to, then that is a solution, but I would consider it to be a really clumsy one compared to Xpediter. _________________ Michael |
|
Back to top |
|
 |
Spolacek Beginner
Joined: 17 Dec 2002 Posts: 17 Topics: 2 Location: NJ, USA
|
Posted: Fri Jul 23, 2021 4:07 pm Post subject: |
|
|
I've worked with Xpediter and Debug. I don't believe there is a Debug command that is equivalent to the Xpediter 'SKIP' command.
However, the same functionality can be achieved by using the Debug 'RUNTO' and 'GOTO' commands.
Assume that you are testing lines 100 thru 105 in your program. You want to execute lines 100 and 101, skip line 102, and then resume execution at line 103.
You tell Debug to execute lines 100 and 101 and then stop by typing a R in the prefix area to the left of line 101 or by typing RUNTO 101 on the command line and then press enter.
When you start the test session, Debug will execute up to line 101 and then stop. At this point, you type GOTO 103 on the command line and press enter. Debug should skip statement 102 and resume execution at statement 103.
Here's a link to the IBM Debug documentation that lists all the test commands. I hope this helps.
https://www.ibm.com/docs/en/debug-tool-for-zos/13.1?topic=messages-debug-tool-commands |
|
Back to top |
|
 |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Thu Jul 29, 2021 1:41 am Post subject: |
|
|
Thanks. The jump/run to commands were ones I knew of.
Basically what you're also saying is that there is no one-to-one corresponding skip command, just work-arounds. _________________ Michael |
|
Back to top |
|
 |
|
|