0106 debugging

4,053 views

Published on

Published in: Education
  • Be the first to comment

0106 debugging

  1. 1. Debugging
  2. 2. Module Objectives <ul><li>Define debugging </li></ul><ul><li>Describe branching to debugging mode </li></ul><ul><li>Define key debugging concepts and functions </li></ul><ul><li>Explain the debugging mode </li></ul><ul><li>Describe examining/changing variables </li></ul><ul><li>Identify breakpoints and watchpoints </li></ul><ul><li>Debug internal tables </li></ul>
  3. 3. What is Debugging? <ul><li>Tool used to identify and eliminate errors in ABAP programs </li></ul><ul><li>Allows the verification of program logic in a step-by-step manner by examining the results of individual statements </li></ul>
  4. 4. Branching to Debugging Mode Program ... . Breakpoint ... . ABAP Editor ABAP Debugger Debugging Program B170D051 Breakpoints Object List Development object ... ... ... . . . Test/execute . . . Any screen ... ... ... System Help . . . Utilities . . . . . . Debug ABAP . . . /h
  5. 5. Key Debugging Concepts <ul><li>Debugger modes </li></ul><ul><li>Examining the value of variables </li></ul><ul><li>Changing the value of variables </li></ul><ul><li>Setting breakpoints </li></ul><ul><li>Setting watchpoints </li></ul><ul><li>Viewing contents of internal tables </li></ul>
  6. 6. The Debugging Display ABAP Debugger Watchpoint f Z C C Table Breakpoints Watchpoints Calls Overview Settings Fields Main Program Source code of EVENT START-OF-SELECTION where matkl = c_matkl. Loop at i_tab. v_counter = v_counter + 1. at new vbeln. write:/ i_tab-vbeln color COL_HEADING. ENDAT. write: /10 i_tab-posnr, i_tab-arktx. endloop. ZZXXXXX ZZXXXXX I_TAB-VBELN 0001234 + /
  7. 7. Debugging Mode
  8. 8. Examining the Value of Variables
  9. 9. Changing the Value of Variables
  10. 10. The Most Important Debugging Functions Single Step Execute Continue Table Breakpoint Watchpoint Return Hexadecimal display Replace Processes the next program line Allows the change of data contents during debugging Processing continues until the next breakpoint (or end of program) is encountered Displays the contents of internal tables Displays data in hexadecimal format Interrupts the program when there is a change in a field Identifies breakpoints Executes all processing steps belonging to one statement Returns from a routine
  11. 11. Setting Breakpoints Menu: Keyword: Utilities -> Breakpoints BREAK-POINT Line selection (double-click) Breakpoint pushbutton Menu: ABAP Editor Debugging Mode Breakpoint -> Create/Delete Activate/Deactivate Delete All Deactivate All Save Breakpoint At Create Watchpoints
  12. 12. Watchpoints Debugging .. Breakpoint .. ABAP Debugger Watchpoint f Z C C or Create/Delete .. .. .. Create Watchpoint
  13. 13. Viewing Contents of Internal Tables
  14. 14. Exercise Exercise 7 – Use the ABAP Debugger, 20 minutes
  15. 15. Question and Answers Any questions?

×