Application Development 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: 

Watch point?

Former Member
0 Kudos

hi,

I know break-point but what is this watchpoint?

Martin

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Break-point- stops the flow of program at defined

point for debug purpose.

Watch-point-It is used to set for particular value

E.g.: if you want to debug only

for matnr value 203 than set watch point

matnr = 203.

When value reaches 203 then

program stops at that point.

One suggestion if you can serach for your query into forum

you will find many answers regarding it instead of putting new thread. This will save your time.

Thanks,

Madhura Nadgauda.

5 REPLIES 5

Former Member
0 Kudos

Hi,

Watch point is attached to a variable and is only triggered when it holds a certain value. For example you could set a watchpoint on SY-SUBRC being not equal to 0, and debug would stop when SY-SUBRC NE 0.

Regards,

Nick

Former Member
0 Kudos

hi,

Watchpoints allow you the option of monitoring the content of individual variables.

The Debugger stops as soon as the value of the monitored variable changes.

In addition, conditions can be specified. The Debugger also checks whether such a condition is fulfilled.

BREAKPOINT

In the source code we set the Break-point there by clicking the stop button,

the system will stop there when you execute the program.

WATCHPOINT

For watchpoints, we need to give some condition and when this condition is satisfied, program will stop

Hope this is helpful, Do reward.

Edited by: Runal Singh on Jan 15, 2008 4:16 PM

Former Member
0 Kudos

Hi,

Break-point- stops the flow of program at defined

point for debug purpose.

Watch-point-It is used to set for particular value

E.g.: if you want to debug only

for matnr value 203 than set watch point

matnr = 203.

When value reaches 203 then

program stops at that point.

One suggestion if you can serach for your query into forum

you will find many answers regarding it instead of putting new thread. This will save your time.

Thanks,

Madhura Nadgauda.

Former Member
0 Kudos

HI!

For watchpoints, we need to give some condition and when this condition is satisfied, program will stop.

Former Member
0 Kudos

Watchpoints

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.

• You can also specify the conditions on which a watchpoint is to become active.

• You can specify logical conditions between up to five conditional watchpoints.

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

Setting Watchpoints

If you want to interrupt a program when the contents of a field or structure change, use a watchpoint. You can set up to five watchpoints, including watchpoints for strings.

A watchpoint can be either local or global. Local watchpoints are only valid in the specified program. Global watchpoints are valid in the specified program, and also in all the other programs it calls.

Procedure

To set a watchpoint, start the Debugger and proceed as follows:

1. Choose Breakpoint  Create watchpoint or the corresponding pushbutton. The Create Watchpoint dialog box appears.

2. Decide whether you want to set a local or global watchpoint.

3. Enter the program and the name of the field for which you want to set the watchpoint. In the Program field, the name of the program currently running is always defaulted.

4. If you want your watchpoint to be activated each time the contents of the field change, the definition is now complete, and you can return to the Debugger by pressing ENTER .

5. To create a conditional watchpoint, that is only activated when a particular situation arises, choose one of the following relational operators.

Operator Meaning

< Less than

<= Less than or equal

= Equal

<> Not equal

>= Greater than or equal

> Greater than

6.

7. You can use the Comparison field option to specify whether the comparison is to be carried out with a value that you specify or with the contents of another field. Depending on your choice from step 6, enter a value or a field for the comparison.

Result

The system confirms the watchpoint and adds it to the list in the display. When you finish your debugging session, the watchpoint is automatically deleted unless you have explicitly saved it.

Specifying Logical Links

If you have more than one conditional watchpoint, you can specify a logical link between them:

OR Only one of the specified conditions must be met

AND All of the conditions must be met.

To create a logical link between watchpoints:

1. Choose Goto &#61614; Control debugging &#61614; Watchpoints or the Watchpoints pushbutton to open the watchpoint display.

2. Set the Logical operator between watchpoints option.

The default value is always OR .

Changing Watchpoints

1. Choose Goto &#61614; Control debugging &#61614; Watchpoints or the Watchpoints pushbutton to display the watchpoint list.

2. Choose the pencil icon in the line containing the watchpoint you want to change.

3. Change the watchpoint attributes in the Create/Change Watchpoint.

3. Choose ENTER .

Deleting Watchpoints

You cannot delete watchpoints by choosing Breakpoint &#61614; Delete or Breakpoint &#61614; Deactivate/activate. Instead, proceed as follows:

1. Choose Goto &#61614; Control debugging &#61614; Watchpoints or the Watchpoints pushbutton to display the watchpoint list.

2. Choose the trashcan icon in the line containing the watchpoint you want to delete.

3.

Memory Monitoring with Watchpoints

You can use watchpoints to display changes to the references of strings, data and object references, and internal tables. By placing an ampersand (&) in front of the object name, you can display the reference in question in hexadecimal format. With internal tables, you can also display the table header by placing an asterisk (*) at the beginning of the name.

&objectname Displays the references of strings, internal tables as well as data and object references

*itab Displays the table header of the internal table itab

Analyzing Source Code

The Debugger contains an extensive range of functions that help you to analyze the source code of a program. You can step through the source code of a program in four different ways.

Displaying the Source Code

All of the display modes in the Debugger have the same structure. The top half of the screen displays an extract from the program source code as it appears in the ABAP Editor.

Features

The Source code of field contains an extract from the program, subroutine, or function module currently being processed. The source code display also contains the following additional functions:

Expand/Reduce Program Segment

Use this button to close the information about the current display mode. The system then displays more of the source code.

Use this button to reopen the information for the current display mode.