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: 

break points

Former Member
0 Kudos

hai gurus...

how many watch points and break point can be used in each program...

&

types of watch points and break points....

Thanks

Pavan

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

<b>BREAK POINT:</b>

A breakpoint is a signal at a particular point in the program that tells the ABAP runtime processor to interrupt processing and start the Debugger. The Debugger is activated when the program reaches this point.

<b>The Debugger contains different breakpoint variants:</b>

<b>Static</b>

A user-specific breakpoint is inserted in the source code as an ABAP statement using the keyword BREAK-POINT. A non user-specific breakpoint is set in the ABAP Editor using the BREAK user name statement.

<b>Directly set dynamic breakpoints</b>

Can be set in the ABAP Editor or the Debugger by double-clicking a line, for example. Dynamic breakpoints are always user-specific, and are deleted when you log off from the R/3 System.

<b>Breakpoints at statements</b>

The Debugger stops the program immediately before the specified statement is executed.

<b>Breakpoints at subroutines</b>

The Debugger stops the program immediately before the specified subroutine is called.

<b>Breakpoints at function modules</b>

The Debugger stops the program immediately before the specified function module is called.

<b>Breakpoints at methods</b>

The Debugger stops the program immediately before the specified method is called.

<b>Breakpoints at exceptions and system exceptions</b>

The Debugger stops the program immediately after a system exception, that is, after a runtime error has been intercepted.

To set a static breakpoint, use the ABAP statement BREAK-POINT . Place the breakpoint in the line at which you want to interrupt the program.

program RSDEBUG_01.

....

if SY-SUBRC <> 0.

break-point.

endif.

Static breakpoints are not normally user-specific. The program is, therefore, always interrupted as soon as the runtime processor reaches the line containing the breakpoint. The program is interrupted regardless of the user who executes it.

However, you can set user-specific static breakpoints using the BREAK statement followed by your user name.

<b>Dynamic Breakpoints</b>

<b>You can set up to 30 dynamic breakpoints without changing the program code.</b> Dynamic breakpoints can be set either in the ABAP Editor or directly in the Debugger.

Setting Dynamic Breakpoints in the ABAP Editor

You can set dynamic breakpoints in the ABAP Editor regardless of whether you are in display or change mode. You can also set breakpoints directly from within the Debugger at runtime. To set a dynamic breakpoint in the ABAP Editor:

Position the cursor on the line of the source code at which you want to set the breakpoint.

Choose Utilities-->Breakpoints-->Set or the Stop icon. The system confirms that the breakpoint has been set.

To display a list of all dynamic breakpoints in a program, choose Utilities-> Breakpoints--> Display. You can use this list to navigate to a particular breakpoint or to delete one or more breakpoints from the program.

<u><b>Watchpoints</b></u>

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.

<b>Use</b>

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.

<b>Features</b>

1) You can set up to <b>five watchpoints</b> in a program.

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

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

4) 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.

5) You can change and delete watchpoints.

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

regards,

Ashok reddy

6 REPLIES 6

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

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

Breakpoints

Apart from being able to execute an ABAP program in the Debugger, you can also start the Debugger call by the choosing a breakpoint. This is achieved by setting one or more of these breakpoints in the program. A breakpoint is a signal at a particular point in the program that tells the ABAP runtime processor to interrupt processing and start the Debugger. The Debugger is activated when the program reaches this point.

There is also a special kind of breakpoint called a watchpoint. When you use watchpoints, the Debugger is not activated until the contents of a particular field change. For more information, refer to the chapter Watchpoints.

Breakpoint Variants

The Debugger contains different breakpoint variants:

Static

A user-specific breakpoint is inserted in the source code as an ABAP statement using the keyword BREAK-POINT. A non user-specific breakpoint is set in the ABAP Editor using the BREAK user name statement.

Directly set

dynamic breakpoints

Can be set in the ABAP Editor or the Debugger by double-clicking a line, for example. Dynamic breakpoints are always user-specific, and are deleted when you log off from the R/3 System.

Breakpoints

at statements

The Debugger stops the program immediately before the specified statement is executed.

Breakpoints

at subroutines

The Debugger stops the program immediately before the specified subroutine is called.

Breakpoints at function modules

The Debugger stops the program immediately before the specified function module is called.

Breakpoints at methods

The Debugger stops the program immediately before the specified method is called.

Breakpoints at exceptions and system exceptions

The Debugger stops the program immediately after a system exception, that is, after a runtime error has been intercepted.

Static Breakpoints

Static breakpoints are always user-independent if there is no specification of a user name. Once a user has inserted the statement BREAK-POINT or BREAK name in an ABAP program, the system always interrupts the program at that point for that user or only for the user name. This procedure is only useful in the development phase of an application when program execution is always to be interrupted at the same place. For more information, refer to the chapter Static Breakpoints.

In HTTP sessions, a static breakpoint is skipped if you did not set additional dynamic HTTP breakpoints in the editor of a BSP page. Instead, a corresponding system log entry is written, which can be checked using transaction SM21.

Dynamic Breakpoints

Dynamic breakpoints are user-specific. Therefore, you should use them if you only want the program to be interrupted when you run it yourself, not when it is being executed by other users. All dynamic breakpoints are deleted when you log off from the R/3 System.

Dynamic breakpoints are more flexible than static breakpoints because you can deactivate or delete them at runtime. They have the following advantages:

· You do not have to change the program code.

· You can set them even when the program is locked by another programmer.

· You can define a counter that only activates the breakpoint after it has been reached.

Special dynamic breakpoints are useful when you want to interrupt a program directly before a particular ABAP statement, a subroutine, or an event, but do not know exactly where to find it in the source code. Event here is used to refer to the occurrence of a particular statement, for example, or calling up a method. Special dynamic breakpoints are user-specific. You can only set them in the Debugger. For more information, refer to the chapter Dynamic Breakpoints.

In HTTP sessions, the system stops both at static and dynamic breakpoints if a dynamic breakpoint was set in the editor of a BSP page before program execution.

Lifetime and Transfer of Breakpoints

A static breakpoint remains intact as long as the BREAK-POINT or BREAK-POINT name statement is not removed from the source code. Without saving, dynamic breakpoints only remain intact in the relevant internal session. However, they remain in effect during the entire user session if they are saved by choosing the menu path Breakpoints ® Save in the ABAP Debugger. For more details on the subject of user sessions and modes, refer to Modularization Techniques in the ABAP keyword documentation.

If you call an HTTP session during a user session, only the HTTP breakpoints are loaded when the HTTP session is started. You activate HTTP debugging in the ABAP Editor by choosing Utilities ® Settings ® HTTP Debugging. Depending on the setting, the system then displays either the HTTP or standard breakpoints in the Editor.

If you call an update session during a user session, breakpoints that were defined beforehand in the calling processing unit are copied to the new update session, where they can be displayed under Breakpoints. If, in the ABAP Debugger, you check Update Debugging under Settings and then, for example, call the update module func using CALL FUNCTION func IN UPDATE TASK, a new window is opened in which you can debug this function module in the update session. All the breakpoints that were set in the calling processing unit can also be processed here.

we can keep them at :

Statements

Subroutines

Function Module Calls

at Methods

System Exceptions

break point :

we can start debugging from that point or if we keep break point at some place we can directly got ot htat point using f6.

watch point: for example if we have to check the output for 4000 records based on a field value i.e.for vendor number 'in'we have to check then we will create watchpoint on field LIFNR value '2000'. then we can directly go to vendor whose numbe ris 2000

Regards,

Sree

Former Member
0 Kudos

hi,

we can have maximum of 30 break points in a programme break pointa are user specfic

types of break points static and dynamic

watch points are used as a remainder to incliude the values of a variable maximum 10 watch points can be used

Former Member
0 Kudos

hi,

<b>BREAKPOINT</b>

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.

<b>Watchpoint</b>

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

example : if you want to debug only

for matnr value 100 than set watch point

matnr = 100. when value reaches 100 than

program stops at that point.

more at

http://help.sap.com/saphelp_nw04/helpdata/en/c6/617cdce68c11d2b2ab080009b43351/content.htm

<b>You can have a maximum of 10 Watch Points and 30 break Points.</b>

Reward points if useful

Regards

Ashu

Former Member
0 Kudos

<b>watchpoint</b>

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

Like a breakpoint, a<b> watchpoint</b> 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.

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

<b>Result</b>

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.

<b>2.Breakpoints</b> <b>Maximum of 30 breakpoints can be used in a program</b>

Apart from being able to execute an ABAP program in the Debugger, you can also start the Debugger call by the choosing a breakpoint. This is achieved by setting one or more of these breakpoints in the program. A breakpoint is a signal at a particular point in the program that tells the ABAP runtime processor to interrupt processing and start the Debugger. The Debugger is activated when the program reaches this point.

There is also a special kind of breakpoint called a watchpoint. When you use watchpoints, the Debugger is not activated until the contents of a particular field change. For more information, refer to the chapter Watchpoints.

Breakpoint Variants

The Debugger contains different breakpoint variants:

<b>Static</b>

A user-specific breakpoint is inserted in the source code as an ABAP statement using the keyword BREAK-POINT. A non user-specific breakpoint is set in the ABAP Editor using the BREAK user name statement.

<b>dynamic breakpoints</b>

Can be set in the ABAP Editor or the Debugger by double-clicking a line, for example. Dynamic breakpoints are always user-specific, and are deleted when you log off from the R/3 System.

<b>Breakpoints at statements</b>

The Debugger stops the program immediately before the specified statement is executed.

<b>Breakpoints at subroutines</b>

The Debugger stops the program immediately before the specified subroutine is called.

<b>

Breakpoints at function modules</b>

The Debugger stops the program immediately before the specified function module is called.

<b>Breakpoints at methods</b>

The Debugger stops the program immediately before the specified method is called.

<b>

Breakpoints at exceptions and system exceptions</b>

The Debugger stops the program immediately after a system exception, that is, after a runtime error has been intercepted.

reward points if it is usefull.....

Girish

Former Member
0 Kudos

Hi,

Static Breakpoints

Static breakpoints are always user-independent if there is no specification of a user name. Once a user has inserted the statement BREAK-POINT or BREAK name in an ABAP program, the system always interrupts the program at that point for that user or only for the user name. This procedure is only useful in the development phase of an application when program execution is always to be interrupted at the same place. For more information, refer to the chapter Static Breakpoints.

In HTTP sessions, a static breakpoint is skipped if you did not set additional dynamic HTTP breakpoints in the editor of a BSP page. Instead, a corresponding system log entry is written, which can be checked using transaction SM21.

Dynamic Breakpoints

Dynamic breakpoints are user-specific. Therefore, you should use them if you only want the program to be interrupted when you run it yourself, not when it is being executed by other users. All dynamic breakpoints are deleted when you log off from the R/3 System.

Dynamic breakpoints are more flexible than static breakpoints because you can deactivate or delete them at runtime. They have the following advantages:

· You do not have to change the program code.

· You can set them even when the program is locked by another programmer.

· You can define a counter that only activates the breakpoint after it has been reached.

Special dynamic breakpoints are useful when you want to interrupt a program directly before a particular ABAP statement, a subroutine, or an event, but do not know exactly where to find it in the source code. Event here is used to refer to the occurrence of a particular statement, for example, or calling up a method. Special dynamic breakpoints are user-specific. You can only set them in the Debugger. For more information, refer to the chapter Dynamic Breakpoints.

In HTTP sessions, the system stops both at static and dynamic breakpoints if a dynamic breakpoint was set in the editor of a BSP page before program execution.

Watch point are used to put logical break point for a certain condition..Example..If you want to know when the internal table is getting append..Then you have to give the program name and the internal table in the watch point..

Steps to create a watch point.

Start debugging '/H'.

In the debugging screen press the create watch point button in the application tool bar..

In the program give the program name..

in the field give the field name.

In the relational operator given '='

In the comp. field/value give the value ..


No. of breakpoints


If you see the debugging screen it can display only 30 breakpoints but as such there is no limit of the number of breakpoints.

Check the BREAKPOINTS tab in the debugging screen. It can only show 30 of them.

Dynamic Breakpoints
You can set up to 30 dynamic breakpoints without changing the program code. Dynamic breakpoints can be set either in the ABAP Editor or directly in the Debugger.

No.of watch points.

watch point there is no limit.

watch points example - suppose you have internal table- internal table has two fields like order no and material no.

if you want see partcular record ,then create watch point.

Regards,

Priyanka.

Former Member
0 Kudos

Hi,

<b>BREAK POINT:</b>

A breakpoint is a signal at a particular point in the program that tells the ABAP runtime processor to interrupt processing and start the Debugger. The Debugger is activated when the program reaches this point.

<b>The Debugger contains different breakpoint variants:</b>

<b>Static</b>

A user-specific breakpoint is inserted in the source code as an ABAP statement using the keyword BREAK-POINT. A non user-specific breakpoint is set in the ABAP Editor using the BREAK user name statement.

<b>Directly set dynamic breakpoints</b>

Can be set in the ABAP Editor or the Debugger by double-clicking a line, for example. Dynamic breakpoints are always user-specific, and are deleted when you log off from the R/3 System.

<b>Breakpoints at statements</b>

The Debugger stops the program immediately before the specified statement is executed.

<b>Breakpoints at subroutines</b>

The Debugger stops the program immediately before the specified subroutine is called.

<b>Breakpoints at function modules</b>

The Debugger stops the program immediately before the specified function module is called.

<b>Breakpoints at methods</b>

The Debugger stops the program immediately before the specified method is called.

<b>Breakpoints at exceptions and system exceptions</b>

The Debugger stops the program immediately after a system exception, that is, after a runtime error has been intercepted.

To set a static breakpoint, use the ABAP statement BREAK-POINT . Place the breakpoint in the line at which you want to interrupt the program.

program RSDEBUG_01.

....

if SY-SUBRC <> 0.

break-point.

endif.

Static breakpoints are not normally user-specific. The program is, therefore, always interrupted as soon as the runtime processor reaches the line containing the breakpoint. The program is interrupted regardless of the user who executes it.

However, you can set user-specific static breakpoints using the BREAK statement followed by your user name.

<b>Dynamic Breakpoints</b>

<b>You can set up to 30 dynamic breakpoints without changing the program code.</b> Dynamic breakpoints can be set either in the ABAP Editor or directly in the Debugger.

Setting Dynamic Breakpoints in the ABAP Editor

You can set dynamic breakpoints in the ABAP Editor regardless of whether you are in display or change mode. You can also set breakpoints directly from within the Debugger at runtime. To set a dynamic breakpoint in the ABAP Editor:

Position the cursor on the line of the source code at which you want to set the breakpoint.

Choose Utilities-->Breakpoints-->Set or the Stop icon. The system confirms that the breakpoint has been set.

To display a list of all dynamic breakpoints in a program, choose Utilities-> Breakpoints--> Display. You can use this list to navigate to a particular breakpoint or to delete one or more breakpoints from the program.

<u><b>Watchpoints</b></u>

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.

<b>Use</b>

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.

<b>Features</b>

1) You can set up to <b>five watchpoints</b> in a program.

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

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

4) 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.

5) You can change and delete watchpoints.

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

regards,

Ashok reddy