Skip to Content
avatar image
Former Member

Debugging

Hi All,

Please let me know the types of Debugging.

Thanks and Regards,

Brahma

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Aug 20, 2007 at 05:22 AM

    Hi,

    Debugging is used to check whether the logic which we have written works correctly. There are 2 types of debugging :

    1. Static Debugging

    2. Dynamic Debugging.

    We go for static debuging when we know the line of code where we want to debug. you can use break-point statement in your code in order to debug it, else u can use the Red color stop button to set the break-point.

    We go for dynammic debugging, when we want to know the program flow while we are executing the program. Hence dynammic debugging is done only during the runtime of the program. For that we have to use /h command in the transaction code in order to debug when we execute the program

    System Debugging

    If you set this option, the Debugger is also activated for system programs (programs with status S in their program attributes). When you save breakpoints, the System Debugging setting is also saved.

    Update Debugging

    Update function modules do not run in the same user session as the program that is currently running in the ABAP Debugger. These function modules are therefore not included in debugging. Only if you select the Update Debugging option can you display and debug them after the COMMIT WORK.

    Normal Debugging

    Normal debugging is the one we do it by the normal dynamic break points or by /H or by using stattic break points.

    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/frameset.htm

    For debugging tutorial:

    http://help.sap.com/saphelp_erp2005vp/helpdata/en/5a/4ed93f130f9215e10000000a155106/frameset.htm

    http://www.sapdevelopment.co.uk/tips/debug/debughome.htm

    http://www.sap-basis-abap.com/sapab002.htm

    Regards,

    Priyanka.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 05:23 AM

    Hi

    System Debugging

    If you set this option, the Debugger is also activated for system programs (programs with status S in their program attributes). When you save breakpoints, the System Debugging setting is also saved.

    Update Debugging

    Update function modules do not run in the same user session as the program that is currently running in the ABAP Debugger. These function modules are therefore not included in debugging. Only if you select the Update Debugging option can you display and debug them after the COMMIT WORK.

    Normal Debugging

    Normal debugging is the one we do it by the normal dynamic break points or by /H or by using stattic break points.

    You can switch to diffferent debuggin modes while processing.

    Also see

    Debugging Docs

    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc

    http://help.sap.com/saphelp_nw04/helpdata/en/5a/4ed93f130f9215e10000000a155106/frameset.htm

    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm

    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc

    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm

    http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm

    http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm

    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm

    Debugging is the way for us to check if the program behave's in a way which we assumes while coding. You have break-points and watch points to help you in this process.

    You have to use F5, F6, F7 and F8 keys while debugging.

    F5 executes the current statement enters the procedures and routines,

    F6 executes the current statement and does not enter procedure but completes it in one step.

    F7 helpsyou to come out of a procedure.

    F8 executes the program completly unless there is any break point set.

    check these.

    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm

    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc

    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm

    http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm

    http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm

    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm

    Regards

    Preeti

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 05:24 AM

    Hi

    Debugging is tool which we will se value during time ,

    you can set break point diffrent ways :

    /h,utilities debugging..

    break point are two types :

    Dynamic break point - when you see editor there should stop button,when you click on stop button,then it is dynamic break point.

    Static break point - just write within code like break userid or break-point.

    if you see within debugging ..

    F5 - Step by step

    F6 - to skip subroutines

    F7- to skip Function module

    f8 - to skip break point.

    each we can set up max 30 break points..

    watch point - watch point basically for paricular record,bu ysing break point you can set up particular record..

    Reward Points if it is helpful

    Thanks

    reward points to all helpful answers

    kiran.M

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 20, 2007 at 05:29 AM

    Hi,

    Some additional info.

    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

    K.Kiran.

    Add comment
    10|10000 characters needed characters exceeded