Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ragarding debugging

Former Member
0 Likes
688

hello folks,

this is regarding debugging,

can any one tell the functionalities of F5,F6,F7 and F8 keys

when we are in debugging mode.

and also in the debugging screen the purpose of watch point

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
658

It is fairly simple

F5 always executes one statement at a time. Its function is fairly straight forward for simple statements and for PERFORM and CALL FUNCTION etc, on doing a F5 you will be taken to first statement in the FORM or FUNCTION etc. This is reasonable as F5 means single step.

F6 on the the other hand completely executes the statement, which means on simple statements, F6 and F5 are similar. But when it comes to PERFORM or CALL FUNCTION etc subroutines, it fully executes the subroutine and comes out of it instead of stepping into it like F5 does. So if you want to debug a PERFORM or CALL FUNCTION you should use F5 on it.

F7 is very useful whenever you are inside a FUNCTION or FORM etc, F7 will take you from wherever you are to the statement following ENDFUNCTION and ENDFORM. This means if you are vexed with FORM or FUNCTION you can just jump out of them using F7

F8 takes you till the end of execution.

Btw whereever I used FUNCTION, FORM etc you can as well use METHOD or any subroutine construct.

6 REPLIES 6
Read only

Former Member
0 Likes
659

It is fairly simple

F5 always executes one statement at a time. Its function is fairly straight forward for simple statements and for PERFORM and CALL FUNCTION etc, on doing a F5 you will be taken to first statement in the FORM or FUNCTION etc. This is reasonable as F5 means single step.

F6 on the the other hand completely executes the statement, which means on simple statements, F6 and F5 are similar. But when it comes to PERFORM or CALL FUNCTION etc subroutines, it fully executes the subroutine and comes out of it instead of stepping into it like F5 does. So if you want to debug a PERFORM or CALL FUNCTION you should use F5 on it.

F7 is very useful whenever you are inside a FUNCTION or FORM etc, F7 will take you from wherever you are to the statement following ENDFUNCTION and ENDFORM. This means if you are vexed with FORM or FUNCTION you can just jump out of them using F7

F8 takes you till the end of execution.

Btw whereever I used FUNCTION, FORM etc you can as well use METHOD or any subroutine construct.

Read only

0 Likes
658

what is the pupose of watch point

Read only

0 Likes
658

You know that a particular variable VAR will take certain value somewhere during the code execution, now you want to go to statement where VAR will take that value. The program may be very large, that you cannot analyze the whole to go to that statement.

Then you create watchpoint VAR = value and then execute F8. Normally F8 takes you to end of execution, but if somewhere in the code if a watchpoint reaches its condition, it will stop at that statement, so that you can debug from there onwards.

You can use boolean operators <>, >=, <=, = and so on in a watch point.

For example:

How can you stop when a message with message number 100 is reached in the code - answer create a watchpoint SY-MSGNO = 100

Read only

0 Likes
658

Hi,

If u create a watch point for <b>sy-subrc eq 0</b>.....<b></b>

whenever the sy-subrc will become 0,at that time system will generate a message like <b>WATCH PIONT REACHED</b>...at the time of <b>DEBUGGING</b>..

Kishore.

Read only

Former Member
0 Likes
658

Watchpoints are used if you want to stop when a particular condition is met. Usually if a value of a field in an internal table is met when you are in loop.

For e.g.: An internal table contains some thousands of rows and you are sure that a field has a particular value some where down the line in internal table. In this case, click on WATCHPOINT button while you are in debug mode, enter value and press F8.

The control stops if the value is met. In this way, you need not have to F5 sequentially which saves enormous time.

Thanks,

Santosh

Read only

Former Member
0 Likes
658

Hi,

Like a breakpoint, a watchpoint is an indicator in a program that tells the ABAP runtime processor to interrupt the program at a particular point. Unlike breakpoints, however, watchpoints are not activated until the contents of a specified field change. Watchpoints, like dynamic breakpoints, are user-specific, and so do not affect other users running the same program. You can only define watchpoints in the Debugger.

Use

You set watchpoints in the Debugger to monitor the contents of specific fields. They inform you when the value of a field changes. When the value changes, the Debugger interrupts the program.

Features

· You can set up to five watchpoints in a program.

See also Setting Watchpoints.

· You can also specify the conditions under which a watchpoint is to become active.

· You can specify a logical link for up to five (conditional) watchpoints.

See also Specifying Logical Links.

· You can define watchpoints as either local or global. If you define a global watchpoint, it is active in all called programs. Local watchpoints are only active in the specified program.

· You can change and delete watchpoints.

See Changing Watchpoints

· You can use watchpoints to display changes to the references of strings, data and object references, and internal tables.

See Memory Monitoring with Watchpoints

regards,

keerthi