Please note that we are recording this live session!
Welcome to your WebEx Live Session!
The New ABAP Debugger has grown up
Session start: 2 pm
Approx. duration: 90 min
Trainer: Christoph StoeckBoris Gebhardt
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
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 / 4
Motivation – The Classic Debugger
We have already a powerfulABAP debugger.
Why do we need a newone ??
SAP AG 2003 Title of Presentation, Speaker Name / 5
Motivation – The New ABAP Debugger
… Therefore
SAP AG 2003 Title of Presentation, Speaker Name / 6
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 / 7
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 / 8
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 / 9
Two Process Architecture
Session 1 - Debuggee
ABAP VM
The New Debugger is attached to an “external session”
Session 2 - Debugger
UI
Debugger Engine/h
SAP AG 2003 Title of Presentation, Speaker Name / 10
Two Process Architecture - Consequences
• The New Debugger is started in a separated session, after prompting “/h”• The debuggee is inactive while the debugger is active.
Advantage: During debugging you still see your last screen input
/h
SAP AG 2003 Title of Presentation, Speaker Name / 11
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 / 12
Two Process Architecture - Consequences
Demo
SAP AG 2003 Title of Presentation, Speaker Name / 13
Two Process Architecture - Consequences
Classic Debugger New Debugger
Subject that is being debugged
Internal session (roll area) ( breakpoints ) UI settings tool content, e.g. variableslost in new roll area
External session (GUI window) breakpoints UI settings tool content, e.g. variablesNOT lost-> /hx closes debugger-> option: close automatically
Window where the debugger is presented in
Same window like application
Separate window last input screen visible focus follows active window
Both debugger: differences in handling
SAP AG 2003 Title of Presentation, Speaker Name / 14
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 / 15
UI Basics
Demo
SAP AG 2003 Title of Presentation, Speaker Name / 16
New Debugger UI – Main Parts
Source line / SY-FieldsControl Area
Process Info
Desktops
Tools
SAP AG 2003 Title of Presentation, Speaker Name / 17
New Debugger UI – 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 !
User specific desktops Standard desktops
SAP AG 2003 Title of Presentation, Speaker Name / 18
Customize The New Debugger UI – Customize layout
Layout customizing can be also done via context menu.
With the standard “Back” button (F3) you can “Undo” all your layout changes
Close ToolCreate ToolExchange ToolFull screen modeMaximize horizontallySwap ToolServices of the tool
Change size
SAP AG 2003 Title of Presentation, Speaker Name / 19
Customize The New Debugger UI – Tools
You may create up to 4 instances of one tool on one desktop. ( e.g. to compare 4 internal tables )
Available Tools: New with 7.0
SAP AG 2003 Title of Presentation, Speaker Name / 20
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 / 21
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 / 22
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 can‘t wait an installer is availble:
\\pwdf1018\d031288\ab4\setup.vbs
FAQ’s: OSS note 812186
SAP AG 2003 Title of Presentation, Speaker Name / 23
ABAP Frontend Editor
Demo
SAP AG 2003 Title of Presentation, Speaker Name / 24
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 / 25
ABAP Frontend Editor – Display Variable Content
Mouse pointer hovers over variable: -> Variable content and type is
displayed in a quick infowindow.
In the control option dialog you can disable the quick info or adapt the reaction time.
SAP AG 2003 Title of Presentation, Speaker Name / 26
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 / 27
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 / 28
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 / 29
Variable Display – New ABAP Debugger Version 6.40
Variable Fast Display
Navigation to Detail View
SAP AG 2003 Title of Presentation, Speaker Name / 30
Variable Display – New ABAP Debugger Version 6.40
SAP AG 2003 Title of Presentation, Speaker Name / 31
Variables & Navigation – Version 7.0
Demo
SAP AG 2003 Title of Presentation, Speaker Name / 32
Variable Display I
Quick info in ABAP Front-end Control
Variable Fast Display
Detail View
SAP AG 2003 Title of Presentation, Speaker Name / 33
Variable Display II
Data Explorer
SAP AG 2003 Title of Presentation, Speaker Name / 34
Variable Display: Globals and Locals
Globals and locals can be activated in the option dialog
SAP AG 2003 Title of Presentation, Speaker Name / 35
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 / 36
Loaded Programs - Globals
Display all global variables of the loaded programs
SAP AG 2003 Title of Presentation, Speaker Name / 37
Variable Navigation: Source = Editor
Double click onvariable
SAP AG 2003 Title of Presentation, Speaker Name / 38
Variable Navigation: Source = Variable fast display
Double click onvariable
SAP AG 2003 Title of Presentation, Speaker Name / 39
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 / 40
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.
Why is XLINE <> XLINE2?Find the difference !!
(XLINE and XLINE2 are only 2000 bytes long …)
Use the brand new debugger Diff tool !
SAP AG 2003 Title of Presentation, Speaker Name / 41
Comparing Variables (Diff-Tool)
Demo
SAP AG 2003 Title of Presentation, Speaker Name / 42
Diff Tool – Navigation To Connected Detail Views
SAP AG 2003 Title of Presentation, Speaker Name / 43
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 / 44
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 / 45
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 / 46
Breakpoints
Debugger
Debugger
Debugger
Logon Session 3
Debugger
Debugger
Debugger
Logon Session 2
Debugger
Debugger
Debugger
Logon Session 1
All logon sessions of one user on one server
SAP AG 2003 Title of Presentation, Speaker Name / 47
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 / 48
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 / 49
Breakpoints – New Debugger
Demo
SAP AG 2003 Title of Presentation, Speaker Name / 50
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 / 51
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)
WP clone accessibleConnection to diff-tool
SAP AG 2003 Title of Presentation, Speaker Name / 52
Breakpoints – New Debugger
Demo
SAP AG 2003 Title of Presentation, Speaker Name / 53
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 / 54
Debugger Tools – New Tools - Architecture
Debugger EngineADI
Debugger UI framework
TOOL_FACTORY
OK_CODE_HANDLER
SUBSCREEN_HANDLER
Tool interface
Function group- screens
Tool classIF_TPDA_TOOL
Stack Editor Breakpoints
Tools
…
The New ABAP Debugger UI frameworks makes it very easy to “plug in” new tools.
SAP AG 2003 Title of Presentation, Speaker Name / 55
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 / 56
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 / 57
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 raisedOption: create exception object always
not possible with Classic ABAP Debugger
SAP AG 2003 Title of Presentation, Speaker Name / 58
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 / 59
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 interfaceSave function module parameters for se37 test environment
Stack Complete Dynpro & ABAP Stack
Save debugging sessionLayoutBreakpointsOptions and settings
SAP AG 2003 Title of Presentation, Speaker Name / 60
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 creationESI
“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 / 61
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 / 62
Q&A
Questions?
SAP AG 2003 Title of Presentation, Speaker Name / 63
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.
Copyright 2005 SAP AG. All Rights Reserved
SAP AG 2003 Title of Presentation, Speaker Name / 64
Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durch SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden.
Die von SAP AG oder deren Vertriebsfirmen angebotenen Softwareprodukte können 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 Ländern.
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 erwähnte 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 erwähnte SAP-Produkte und -Dienst-
leistungen sowie die entsprechenden Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und anderen Ländern weltweit. Alle anderen Namen von Produkten und Dienstleistungen sind Marken der jeweiligen Firmen.
Copyright 2005 SAP AG. Alle Rechte vorbehalten