Sie sind auf Seite 1von 64

Welcome to your WebEx Live Session!

The New ABAP Debugger has grown up


Session start: 2 pm Approx. duration: 90 min Trainer: Christoph Stoeck Boris Gebhardt

Please note that we are recording this live session!

Content

Motivation Architecture & Handling UI Basics New ABAP Frontend Editor Variable Display & Navigation Comparing Variables (Diff-Tool) Breakpoints & Watchpoints Debugger Framework Summary, Open Points & Outlook Q&A

SAP AG 2003 Title of Presentation, Speaker Name / 2

Content

Motivation Architecture & Handling UI Basics New ABAP Frontend Editor Variable Display & Navigation Comparing Variables (Diff-Tool) Breakpoints & Watchpoints Debugger Framework Summary, Open Points & Outlook Q&A

SAP AG 2003 Title of Presentation, Speaker Name / 3

Motivation The Classic Debugger

We have already a powerful ABAP debugger. Why do we need a new one ??

SAP AG 2003 Title of Presentation, Speaker Name / 4

Motivation The New ABAP Debugger

Therefore

SAP AG 2003 Title of Presentation, Speaker Name / 5

Current Status Classic Debugger


Classic Debugger Technology
 Debugger and debuggee run in the same (internal) session  Debugger dynpros placed in-between

Consequences
 Not all ABAP code can be debugged (no RPERFs: Conversion / Field exit))  Not free of side effects (F1, F4 help, list output)  Implementation of new features not always straight-forward  No chance to use modern UI techniques (no ABAP allowed in the debugger !)

We need a new ABAP debugger technology


SAP AG 2003 Title of Presentation, Speaker Name / 6

Goals New ABAP Debugger

Higher productivity for development & support using ABAP debugger


 More robust debugger architecture (no side effects)  Possibility to implement new features (e.g. a diff tool for internal tables) faster and with less risks  More flexible & extensible state-of-the-art debugger UI

Use two separated sessions for the debugger and the application
SAP AG 2003 Title of Presentation, Speaker Name / 7

Content

Motivation Architecture & Handling UI Basics New ABAP Frontend Editor Variable Display & Navigation Comparing Variables (Diff-Tool) Breakpoints & Watchpoints Debugger Framework Summary, Open Points & Outlook Q&A

SAP AG 2003 Title of Presentation, Speaker Name / 8

Two Process Architecture

The New Debugger is attached to an external session Session 1 - Debuggee


ABAP VM

Session 2 - Debugger

/h

Debugger Engine

UI

SAP AG 2003 Title of Presentation, Speaker Name / 9

Two Process Architecture - Consequences


/h

The New Debugger is started in a separated session, after prompting /h The debuggee is inactive while the debugger is active. Advantage:
SAP AG 2003 Title of Presentation, Speaker Name / 10

During debugging you still see your last screen input

Two Process Architecture - Consequences

The debugger is still available but inactive, when the program finished The debugger is not closed as long as the debuggee session is alive ! You may detach the debugger by prompting /hx in the debuggee session Advantage: The debugger with all your settings, variables, breakpoints, is always available, when you restart debugging !

SAP AG 2003 Title of Presentation, Speaker Name / 11

Two Process Architecture - Consequences

Demo

SAP AG 2003 Title of Presentation, Speaker Name / 12

Two Process Architecture - Consequences

Both debugger: differences in handling


Classic Debugger
Subject
that is being debugged

New Debugger
External session (GUI window)  breakpoints  UI settings  tool content, e.g. variables NOT lost -> /hx closes debugger -> option: close automatically

Internal session (roll area)  ( breakpoints )  UI settings  tool content, e.g. variables lost in new roll area

Window
where the debugger is presented in

Same window like application

Separate window  last input screen visible  focus follows active window

SAP AG 2003 Title of Presentation, Speaker Name / 13

Content

Motivation Architecture & Handling UI Basics New ABAP Frontend Editor Variable Display & Navigation Comparing Variables (Diff-Tool) Breakpoints & Watchpoints Debugger Framework Summary, Open Points & Outlook Q&A

SAP AG 2003 Title of Presentation, Speaker Name / 14

UI Basics

Demo

SAP AG 2003 Title of Presentation, Speaker Name / 15

New Debugger UI Main Parts


Process Info Control Area Source line / SY-Fields Desktops

Tools

SAP AG 2003 Title of Presentation, Speaker Name / 16

New Debugger UI Desktops


User specific desktops Standard desktops

The New Debugger provides: Three user specific desktops, which you can customize and save as your favorite debugger environment
Seven standard desktops, which should cover most of the common working conditions in the debugger: Standard: Stepping through the code (Editor, Stack, Quick Watch) Structures: Display structures Tables: Display tables Objects: Display objects DetailDispls: Display strings , simple fields Break-/Watchpoints: Maintain your break-/watch-/checkpoints Diff Compare Variables

Save current layout of the user specific desktops. The customizing of the standard desktops is NOT saved !

SAP AG 2003 Title of Presentation, Speaker Name / 17

Customize The New Debugger UI Customize layout


With the standard Back button (F3) you can Undo all your layout changes

Change size

Close Tool Create Tool Exchange Tool Full screen mode Maximize horizontally Swap Tool Services of the tool

Layout customizing can be also done via context menu.


SAP AG 2003 Title of Presentation, Speaker Name / 18

Customize The New Debugger UI Tools


Available Tools: New with 7.0

You may create up to 4 instances of one tool on one desktop. ( e.g. to compare 4 internal tables )
SAP AG 2003 Title of Presentation, Speaker Name / 19

Customize The New Debugger UI Tool Services


All features of a tool can be accessed via the tool service button

or the context menu


SAP AG 2003 Title of Presentation, Speaker Name / 20

Content

Motivation Architecture & Handling New ABAP Debugger UI Basics New ABAP Frontend Editor Variable Display & Navigation Comparing Variables (Diff-Tool) Breakpoints & Watchpoints Debugger Framework Summary, Open Points & Outlook Q&A

SAP AG 2003 Title of Presentation, Speaker Name / 21

ABAP Frontend Editor


Main features
Syntax coloring Block marking / folding Display variable content & type Easy BP handling

New ABAP Frontend Editor will be part of standard 6.40 GUI within the next month. But for colleagues who cant wait an installer is availble: \\pwdf1018\d031288\ab4\setup.vbs FAQs: OSS note 812186

SAP AG 2003 Title of Presentation, Speaker Name / 22

ABAP Frontend Editor

Demo

SAP AG 2003 Title of Presentation, Speaker Name / 23

ABAP Frontend Editor Source Display features

Syntax coloring Block marking / folding Display scope Convenient vertical and horizontal scrolling Powerful search functionality Control (layout, colors, ) can be customized

SAP AG 2003 Title of Presentation, Speaker Name / 24

ABAP Frontend Editor Display Variable Content

Mouse pointer hovers over variable: -> Variable content and type is displayed in a quick info window.

In the control option dialog you can disable the quick info or adapt the reaction time.

SAP AG 2003 Title of Presentation, Speaker Name / 25

ABAP Frontend Editor Set Breakpoints

Set / Delete breakpoints by clicking in the left (breakpoint) column . Double-Clicking in the code will no longer set or delete breakpoints. Deactivate /Activate the breakpoint via context menu.
SAP AG 2003 Title of Presentation, Speaker Name / 26

ABAP Frontend Editor Context Menu

Editor Context Menu contains: local control features like Find,Outlining Debug features like maintain BP, Jump to statement ) Other services including layout customizing

SAP AG 2003 Title of Presentation, Speaker Name / 27

Content

Motivation Architecture & Handling UI Basics New ABAP Frontend Editor Variable Display & Navigation Comparing Variables (Diff-Tool) Breakpoints & Watchpoints Debugger Framework Summary, Open Points & Outlook Q&A

SAP AG 2003 Title of Presentation, Speaker Name / 28

Variable Display New ABAP Debugger Version 6.40


Variable Fast Display

Navigation to Detail View

SAP AG 2003 Title of Presentation, Speaker Name / 29

Variable Display New ABAP Debugger Version 6.40

SAP AG 2003 Title of Presentation, Speaker Name / 30

Variables & Navigation Version 7.0

Demo

SAP AG 2003 Title of Presentation, Speaker Name / 31

Variable Display I
Quick info in ABAP Front-end Control

Variable Fast Display

Detail View

SAP AG 2003 Title of Presentation, Speaker Name / 32

Variable Display II
Data Explorer

SAP AG 2003 Title of Presentation, Speaker Name / 33

Variable Display: Globals and Locals

Globals and locals can be activated in the option dialog


SAP AG 2003 Title of Presentation, Speaker Name / 34

Download Parameters To Function Builder


The current parameters of a function module can be stored in the function builder test framework.

Function builder test data dictionary

SAP AG 2003 Title of Presentation, Speaker Name / 35

Loaded Programs - Globals


Display all global variables of the loaded programs

SAP AG 2003 Title of Presentation, Speaker Name / 36

Variable Navigation: Source = Editor


Double click on variable

SAP AG 2003 Title of Presentation, Speaker Name / 37

Variable Navigation: Source = Variable fast display

Double click on variable

SAP AG 2003 Title of Presentation, Speaker Name / 38

Content

Motivation Architecture & Handling UI Basics New ABAP Frontend Editor Variable Display & Navigation Comparing Variables (Diff-Tool) Breakpoints & Watchpoints Debugger Framework Summary, Open Points & Outlook Q&A

SAP AG 2003 Title of Presentation, Speaker Name / 39

Diff Tool

Why is XLINE <> XLINE2? Find the difference !! (XLINE and XLINE2 are only 2000 bytes long ) Use the brand new debugger Diff tool !

Diff tool: Compare two compatible ABAP variables: e.g. two tables, objects, structures, strings, Diff tool provides differences concerning type and value. For value differences the ABAP IF semantic is used.
SAP AG 2003 Title of Presentation, Speaker Name / 40

Comparing Variables (Diff-Tool)

Demo

SAP AG 2003 Title of Presentation, Speaker Name / 41

Diff Tool Navigation To Connected Detail Views

SAP AG 2003 Title of Presentation, Speaker Name / 42

Diff Tool Start New Diff For Subcomponents

For subcomponents of type reference or internal table no deep diff is executed. But in the corresponding result lines you find again a diff button to start a comparison for these sub components. You may use the history tab to get back to the first result list.
SAP AG 2003 Title of Presentation, Speaker Name / 43

Content

Motivation Architecture & Handling UI Basics New ABAP Frontend Editor Variable Display & Navigation Comparing Variables (Diff-Tool) Breakpoints & Watchpoints Debugger Framework Summary, Open Points & Outlook Q&A

SAP AG 2003 Title of Presentation, Speaker Name / 44

Breakpoints

How many different breakpoint kinds do exist ?


Debugger breakpoints scope: debugging session set in : debugger Session breakpoints scope: logon session set in : development workbench User (external) breakpoints scope: all logon sessions (for one user on one server) set in : development workbench

SAP AG 2003 Title of Presentation, Speaker Name / 45

Breakpoints

All logon sessions of one user on one server


Logon Session 1 Logon Session 2
Debugger Debugger Debugger Debugger Debugger Debugger Debugger Debugger Debugger

Logon Session 3

SAP AG 2003 Title of Presentation, Speaker Name / 46

Breakpoints Create A Breakpoint


Create/Delete a breakpoint in the Editor by clicking on the breakpoint column

F4 help on classes / methods function modules

SAP AG 2003 Title of Presentation, Speaker Name / 47

Breakpoints Maintain Breakpoints

Create/Delete/Activate/Deactivate breakpoints

Specify how often the breakpoint shall be skipped before stopping

SAP AG 2003 Title of Presentation, Speaker Name / 48

Breakpoints New Debugger

Demo

SAP AG 2003 Title of Presentation, Speaker Name / 49

Watchpoints

Check content changes of ABAP variables


specify variable stop on change of variable all global, local variables possible including internal tables not possible: debugger symbols pointing into internal tables e.g.: itab[1]-comp specify variable & condition stop when variable changes AND condition is true condition restricted to two operands and 1 operator built-in functions ( lines( ) and strlen( ) ) possible e.g.: sy-subrc <> 0 or strlen( string ) > 10 can be activated / inactivated

SAP AG 2003 Title of Presentation, Speaker Name / 50

Watchpoints

When stopping at a watchpoint


value of old variable is available (reference to WP clone) Diff-tool can be used to be guided to difference(s)

Connection to diff-tool WP clone accessible

SAP AG 2003 Title of Presentation, Speaker Name / 51

Breakpoints New Debugger

Demo

SAP AG 2003 Title of Presentation, Speaker Name / 52

Content

Motivation New ABAP Debugger Core Basics New ABAP Debugger UI Basics New ABAP Frontend Editor Variable Display & Navigation Comparing Variables (Diff-Tool) Breakpoints & Watchpoints Debugger Framework Summary, Open Points & Outlook Q&A

SAP AG 2003 Title of Presentation, Speaker Name / 53

Debugger Tools New Tools - Architecture

Debugger Engine

ADI
Debugger UI framework
TOOL_FACTORY OK_CODE_HANDLER SUBSCREEN_HANDLER Tool interface

Stack

Editor

Breakpoints

Tool class
IF_TPDA_TOOL

Tools
SAP AG 2003 Title of Presentation, Speaker Name / 54

The New ABAP Debugger UI frameworks makes it very easy to plug in new tools.

Function group - screens

Debugger UI Framework Reuse In Other Applications

The New ABAP Debugger UI can be reused by other applications: E.g. the new ABAP Runtime Analysis uses the Debugger UI Framework
SAP AG 2003 Title of Presentation, Speaker Name / 55

Content

Motivation New ABAP Debugger Core Basics New ABAP Debugger UI Basics New ABAP Frontend Editor Variable Display & Navigation Comparing Variables (Diff-Tool) Breakpoints & Watchpoints Debugger Framework Summary, Open Points & Outlook Q&A

SAP AG 2003 Title of Presentation, Speaker Name / 56

New ABAP Debugger Features 7.00


Match and extent functionality of Classic Debugger
  

Insert, delete rows of internal tables Watchpoints External debugging


 RFC  BSP: view or single step on both: BSP and ABAP-source  WebDynpro ABAP  Attach/Batch debugging: use attach in sm50 or jdbg in sm37  Update debugging  ITS based services

 

Memory Analysis Tool ( Integration of Memory Inspector ) Miscellaneous


 Explicit start of garbage collector  Explicit DB commit / DB rollback  Exception handling
 Navigate to source position, where exception was raised  Option: create exception object always

not possible with Classic ABAP Debugger


SAP AG 2003 Title of Presentation, Speaker Name / 57

New ABAP Debugger Features 7.00


New functionality ( New Tools )


Integration of New Edit Control


 Syntax highlighting  Tool tip on hovering for variables content

Diff-Tool
 Easily navigate through differences of internal tables, structures, etc

Data Explorer
 Navigation through and display of data object graphs

Loaded Programs
 Overview of all loaded programs  Identification of program groups and program heads  Displays all global data of a specified loaded programs

Dynpro-Analysis
 dynpro and container tree  dynpro and container properties

System areas

: internal

SAP AG 2003 Title of Presentation, Speaker Name / 58

New ABAP Debugger Features 7.00


New functionality ( miscellaneous )


Variable Fast Display


 Display of all global variables  Display of all local variables
 Identification of procedure interface  Save function module parameters for se37 test environment

Stack
 Complete Dynpro & ABAP Stack

 Save

debugging session

 Layout  Breakpoints  Options and settings

SAP AG 2003 Title of Presentation, Speaker Name / 59

Outlook: 7.1
 

WebDynpro support Breakpoints


 Conditions  BPs on program change (SY-REPID problem)  BPs in dynpro flow logic  BPs on objects

 

Macro debugging Advanced external debugging


 SHO: automated area creation  ESI

   

Simple Transformation debugging Changing long fields Stack of calling internal sessions Statement tracing

Your input is welcome: http://bis:1080 -> ABAP Request Portal


SAP AG 2003 Title of Presentation, Speaker Name / 60

Content

Motivation New ABAP Debugger Core Basics New ABAP Debugger UI Basics New ABAP Frontend Editor Variable Display & Navigation Comparing Variables (Diff-Tool) Breakpoints & Watchpoints Debugger Framework Summary, Open Points & Outlook Q&A

SAP AG 2003 Title of Presentation, Speaker Name / 61

Questions?

Q&A

SAP AG 2003 Title of Presentation, Speaker Name / 62

Copyright 2005 SAP AG. All Rights Reserved




No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, WINDOWS, NT, EXCEL, Word, PowerPoint and SQL Server are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix and Informix Dynamic ServerTM are trademarks of IBM Corporation in USA and/or other countries. ORACLE is a registered trademark of ORACLE Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, the Citrix logo, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, MultiWin and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc. HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. JAVA is a registered trademark of Sun Microsystems, Inc. JAVASCRIPT is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One. SAP, SAP Logo, R/2, R/3, mySAP, mySAP.com and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are trademarks of their respective companies.

  

 

 

SAP AG 2003 Title of Presentation, Speaker Name / 63

Copyright 2005 SAP AG. Alle Rechte vorbehalten




Weitergabe und Vervielfltigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrckliche schriftliche Genehmigung durch SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen knnen ohne vorherige Ankndigung gendert werden. Die von SAP AG oder deren Vertriebsfirmen angebotenen Softwareprodukte knnen Softwarekomponenten auch anderer Softwarehersteller enthalten. Microsoft, WINDOWS, NT, EXCEL, Word, PowerPoint und SQL Server sind eingetragene Marken der Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix und Informix Dynamic ServerTM sind Marken der IBM Corporation in den USA und/oder anderen Lndern. ORACLE ist eine eingetragene Marke der ORACLE Corporation. UNIX, X/Open, OSF/1 und Motif sind eingetragene Marken der Open Group. Citrix, das Citrix-Logo, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, MultiWin und andere hier erwhnte Namen von Citrix-Produkten sind Marken von Citrix Systems, Inc. HTML, DHTML, XML, XHTML sind Marken oder eingetragene Marken des W3C, World Wide Web Consortium, Massachusetts Institute of Technology. JAVA ist eine eingetragene Marke der Sun Microsystems, Inc. JAVASCRIPT ist eine eingetragene Marke der Sun Microsystems, Inc., verwendet unter der Lizenz der von Netscape entwickelten und implementierten Technologie. MarketSet und Enterprise Buyer sind gemeinsame Marken von SAP AG und Commerce One. SAP, SAP Logo, R/2, R/3, mySAP, mySAP.com und weitere im Text erwhnte SAP-Produkte und -Dienstleistungen sowie die entsprechenden Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und anderen Lndern weltweit. Alle anderen Namen von Produkten und Dienstleistungen sind Marken der jeweiligen Firmen.

  

 

 

SAP AG 2003 Title of Presentation, Speaker Name / 64