conditional break points.pdf

24
Conditional Breakpoints Efficient Debugging at Your Fingertips

Upload: princeraj4ever

Post on 07-Jan-2016

18 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 1/24

Conditional BreakpointsEfficient Debugging at Your Fingertips

Page 2: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 2/24

© SAP 2008 / Page 2

Objectives

 At the end of this unit, you will be able to:

Understand the purpose of conditional breakpoints

Enable the usage of conditional breakpoints

Use conditional breakpoints for debugging

Page 3: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 3/24

© SAP 2008 / Page 3

1. The usage of conditional breakpoints2. Perform setup for conditional breakpoints

 – Activate checkpoint group CRMUIF_CONDITIONAL_BREAKPOINTS

 – Enable external debugging

3. Use conditional breakpoints for CRM WebUI application debugging

Agenda

Page 4: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 4/24

© SAP 2008 / Page 4

The Purpose of Conditional Breakpoints

Conditional breakpoints should help to overcome the following difficulties, that are

typical for debugging CRM UI framework based applications:

For a non-expert it is difficult to figure out where to set an ABAP breakpoint

Because of the deep call hierarchy even experts need many debugger clicks toinspect the objects which cause a particular defect

Since the same coding is called frequently in a framework it is hard to interrupt

framework execution at the right time

The ABAP debugger does not support watch-points well

 As a result they can be used to efficiently analyze the CRM application and to find

errors in customer enhancements.

Page 5: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 5/24

© SAP 2008 / Page 5

The Purpose of Conditional Breakpoints

Conditional breakpoints support efficient debugging at UI framework events like

Specified or non-specified UI Framework events (e.g. End-user presses any button)

 A BOL Component is loaded

The design layer customizing for a field is determined

 A UI Element is created via a CHTMLB-tag

 At exceptions

… many more …

They allow to define conditions when the ABAP debugger is to be activated

For the name of a UI Framework event (e.g. “SAVE”)

For the name of a BOL Object (e.g. “Sales Order”)

For a part of an exception or message text (using wildcards)

… for many more context attributes …

Page 6: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 6/24

© SAP 2008 / Page 6

Conditional breakpoints are predefined and delivered through standard

coding

Each conditional breakpoint is based on an assert statement

They are placed at error prone or central location

Example taken from

CL_CRM_BOL_ENTITY

method DELETE

The Purpose of Conditional Breakpoints

Page 7: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 7/24

© SAP 2008 / Page 7

Conditional breakpoints

can be directly activated

within the CRM UI

WebClient via hotkey ALT-F2

The Purpose of Conditional Breakpoints

Page 8: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 8/24

© SAP 2008 / Page 8

The ABAP debugger 

pops up automatically

when the conditional

breakpoint is reached.

The Purpose of Conditional Breakpoints

Page 9: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 9/24

© SAP 2008 / Page 9

1. The usage of conditional breakpoints2. Perform setup for conditional breakpoints

 – Activate checkpoint group CRMUIF_CONDITIONAL_BREAKPOINTS

 – Enable external debugging

3. Use conditional breakpoints for CRM WebUI application debugging

Agenda

Page 10: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 10/24

© SAP 2008 / Page 10

Setup for Conditional Breakpoints

Use transaction SAAB to

activate checkpoint group

CRMUIF_CONDITIONAL_ BREAKPOINTS for your

user.

Make sure your user hasauthorizations for

debugging!

Page 11: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 11/24

© SAP 2008 / Page 11

Setup for Conditional Breakpoints

The following alternatives can be used to activate external debugging:

1. Use transaction START_BSP to launch the CRM WebUI with the option “External

Debugging On”

2.  Activate debugging in transaction BSP_WD_CMPWB

3.  Activate external debugging in transaction SE80

Page 12: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 12/24

© SAP 2008 / Page 12

Setup for Conditional Breakpoints

Alternative 1: Use

transaction START_BSP

to launch the CRM WebUI

with the option “External

Debugging On”

Page 13: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 13/24

© SAP 2008 / Page 13

Setup for Conditional Breakpoints

Alternative 2: Activate

debugging in transaction

BSP_WD_CMPWB

Page 14: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 14/24

© SAP 2008 / Page 14

Setup for Conditional Breakpoints

Alternative 3: Navigate

into some workbench

coding (e.g. Page

default.htm in BSP

CRM_UI_START) in

transaction SE80. Choose

menu option Utilities

External Breakpoints

 Activate

Page 15: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 15/24

© SAP 2008 / Page 15

Setup for Conditional Breakpoints

Troubleshooting: Watch

out for error messages in

the header of the

breakpoint definition

popup.

Page 16: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 16/24

© SAP 2008 / Page 16

Setup for Conditional Breakpoints

Troubleshooting: If the

debugger window does not

appear also you did the

setup and defined a

conditional breakpoint, try

to first delete all external

breakpoints that possibly

were defined in previoussessions and re-try.

Choose menu path Utilities

External Breakpoints

Display

Page 17: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 17/24

© SAP 2008 / Page 17

1. The usage of conditional breakpoints2. Perform setup for conditional breakpoints

 – Activate checkpoint group CRMUIF_CONDITIONAL_BREAKPOINTS

 – Enable external debugging

3. Use conditional breakpoints for CRM WebUI application debugging

Agenda

Page 18: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 18/24

© SAP 2008 / Page 18

Use Conditional Breakpoints for Debugging

You may want to use conditional breakpoints to analyze the coding of a standard application

feature to later use it as a template for a customer development.

 As example: The feature of navigating from a search result table to the details of a result row.

Page 19: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 19/24

© SAP 2008 / Page 19

Use Conditional Breakpoints for Debugging

Navigate to a view that

contains the application

feature you want to

analyze and press ALT-F2.

Since you do not know the

technical event name that

triggers the application

feature you choose option

“Additional break at any

Server Event”.

With this option the

debugger pops up at anyUI event.

Page 20: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 20/24

© SAP 2008 / Page 20

Use Conditional Breakpoints for Debugging

 After pressing a link in a

result row the debugger

window pops up and stops

at the conditional

breakpoint.

The ABAP comments

below the conditional

breakpoint explain how to

step into the event-specific

coding.

The variable

HTMLB_EVENT_EX->IF_HTMLB_DATA~EVEN

T_SERVER_NAME

contains the event name

“SINGLESELECT”.

Page 21: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 21/24

© SAP 2008 / Page 21

Use Conditional Breakpoints for Debugging

You followed the

instructions within the

 ABAP comments below

the conditional breakpoint

and found the coding that

you want to use as

template for your customer

development.

Page 22: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 22/24

© SAP 2008 / Page 22

Use Conditional Breakpoints for Debugging

If you again want to debug

the same application

feature you can define the

breakpoint specifically for

the event name

“SINGLESELECT” found

out in the first debugging

session.

This prevents the

debugger to be launched

at non-relevant events.

Page 23: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 23/24

© SAP 2008 / Page 23

Lesson Summary

This unit covered

The purpose of conditional breakpoints

The setup for using conditional breakpoints

The use of conditional breakpoints

Page 24: Conditional Break Points.pdf

7/17/2019 Conditional Break Points.pdf

http://slidepdf.com/reader/full/conditional-break-pointspdf 24/24