Sep 26, 2014

Debugging Web Dynpro ABAP Applications

The ABAP runtime environment contains various tools that you can use for analysis purposes, such as for debugging source code. All source code written for Web Dynpro applications in ABAP can normally be tested using the debugger.
To allow it to test other Web Dynpro-specific program entities too, the debugger has been equipped with a special enhancement. In the phase model in the active application, you can typically see the following information at various points in time:
  • The structure of the content of the current controller,
  • The properties of the UI elements in the layout of the current view
  • The currently instantiated component usages

Starting the Debugger
The functions to debug Web Dynpro units are embedded in the New Debugger. Therefore you must have selected the new Debugger in your workbench settings.
Selecting the New Debugger
  1. In the menu, choose Utilities -> Settings... (return).
  2. Choose the parent tab page ABAP Editor.
    The settings for ABAP Editor open with the content of the child tab page Editor.
  3. Under Editor, select the option Front-End Editor (new).
  4. Switch to the Debugging tab page.
  5. Under ABAP Debugger, select the option New Debugger.
  6. Save your entries.
Starting the Debugging Process
  1. To run an application in debugging mode, you first need to set an external breakpoint in display mode in one of the methods in the component:
    Setting an external breakpoint (Setting an external breakpoint)
    Note Note
    Note that this is an external breakpoint.
    End of the note.
    The method in which you set the breakpoint depends on the purpose of the test run. To debug a view, for example, it is best to set the breakpoint in method WDDOMODIFYVIEW. Provided that the context of the view controller is not filled using a supply method, the view is fully instantiated in the phase model at this point in time.
  2. Now start a test run of the application from ABAP Workbench as usual.
Selecting the Web Dynpro Tool in the New Debugger
When you start the application, another session opens automatically for the debugger. If you have not yet saved any personal settings with regard to the layout of the debugger, the Editor tool will now appear on the left, with the Display Variables tool on the right.
  1. Select one of the three desktops in order to reconfigure it for debugging the Web Dynpro application (refer to Designing Work Areas).
  2. The right-hand edge of the debugger window has a bar of function symbols. Choose the Replace Tools symbol:
    Replace tools (Replace tools)
  3. In the New Tool window, open the lowest node (Special Tools) and choose Web Dynpro.
  4. Save your entries.
On the right of the debugger desktop, you will see that the previous tool has now been replaced by the Web Dynpro debugger. You can save this setting for future debugging activities. To do this, choose Save Layout in the debugger’s general toolbar:
Save layout (Ctrl+Shift+F3) (Save layout (Ctrl+Shift+F3))


Ref: http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/74d50bd1431b5ae10000000a42189c/content.htm

No comments :