0106 debugging

15
Debugging

Post on 18-Oct-2014

3.229 views

Category:

Education


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: 0106 debugging

Debugging

Page 2: 0106 debugging

Copyright © 2005 Accenture2

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

Page 3: 0106 debugging

Copyright © 2005 Accenture3

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

Page 4: 0106 debugging

Copyright © 2005 Accenture4

Branching to Debugging Mode

Program ... . Breakpoint ... .

ABAP Editor

ABAP Debugger

ABAP Debugger

Debugging

Program B170D051

Breakpoints

Object List

Development object ... ... ...

. . .Test/execute. . .

Any screen

... ... ... System Help

. . .Utilities. . .

. . .Debug ABAP. . ./h

Page 5: 0106 debugging

Copyright © 2005 Accenture5

Key Debugging Concepts

• Debugger modes

• Examining the value of variables

• Changing the value of variables

• Setting breakpoints

• Setting watchpoints

• Viewing contents of internal tables

Page 6: 0106 debugging

Copyright © 2005 Accenture6

The Debugging Display

ABAP Debugger

WatchpointfZC C

Table Breakpoints Watchpoints Calls Overview SettingsFields

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 + /

Page 7: 0106 debugging

Copyright © 2005 Accenture7

Debugging Mode

Page 8: 0106 debugging

Copyright © 2005 Accenture8

Examining the Value of Variables

Page 9: 0106 debugging

Copyright © 2005 Accenture9

Changing the Value of Variables

Page 10: 0106 debugging

Copyright © 2005 Accenture10

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

Page 11: 0106 debugging

Copyright © 2005 Accenture11

Setting Breakpoints

Menu:

Keyword:

Utilities -> Breakpoints

BREAK-POINT

Line selection (double-click)Breakpoint pushbutton

Menu:

ABAP Editor

Debugging Mode

Breakpoint -> Create/DeleteActivate/Deactivate Delete AllDeactivate AllSaveBreakpoint AtCreate Watchpoints

Page 12: 0106 debugging

Copyright © 2005 Accenture12

Watchpoints

Debugging .. Breakpoint ..

ABAP Debugger

WatchpointfZC C

or

Create/Delete

..

..

..

Create Watchpoint

Page 13: 0106 debugging

Copyright © 2005 Accenture13

Viewing Contents of Internal Tables

Page 14: 0106 debugging

Copyright © 2005 Accenture14

Exercise

Exercise 7 – Use the ABAP Debugger, 20 minutes

Page 15: 0106 debugging

Copyright © 2005 Accenture15

Any questions?

Question and Answers