Вы находитесь на странице: 1из 15

Debugging

Copyright 2005 Accenture


2
Module Objectives
Define debugging
Describe branching to debugging mode
Define key debugging concepts and functions
Explain the debugging mode
Describe examining/changing variables
Identify breakpoints and watchpoints
Debug internal tables
Copyright 2005 Accenture
3
What is Debugging?
Tool used to identify and eliminate errors in
ABAP programs
Allows the verification of program logic in a step-
by-step manner by examining the results of
individual statements



Copyright 2005 Accenture
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
Copyright 2005 Accenture
5
Key Debugging Concepts
Debugger modes
Examining the value of variables
Changing the value of variables
Setting breakpoints
Setting watchpoints
Viewing contents of internal tables
Copyright 2005 Accenture
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
+
/
Copyright 2005 Accenture
7
Debugging Mode
Copyright 2005 Accenture
8
Examining the Value of
Variables
Copyright 2005 Accenture
9
Changing the Value of Variables
Copyright 2005 Accenture
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
Copyright 2005 Accenture
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
Copyright 2005 Accenture
12
Watchpoints
Debugging .. Breakpoint ..
ABAP Debugger
Watchpoint f Z C C
or
Create/Delete

..

..

..




Create Watchpoint
Copyright 2005 Accenture
13
Viewing Contents of Internal
Tables
Copyright 2005 Accenture
14
Exercise
Exercise 7 Use the ABAP Debugger, 20 minutes
Copyright 2005 Accenture
15
Any questions?
Question and Answers

Вам также может понравиться