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
The
functions for debugging Web Dynpro entities are embedded in the
new debugger. You
therefore need to have selected the new debugger in your Workbench
settings.
Selecting the New Debugger1. In the menu, choose Utilities -> Settings.
2. A dialog box now appears that contains two nested tab page areas. Choose the “parent” tab page ABAP Editor.
3. The settings for ABAP Editor always open with the content of the child tab page Editor. Here, select Front End Editor (New).
4. Now switch to the Debugging tab page in the ABAP Editor settings and select New Debugger.
5. Save your changes and close the dialog.
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:
.
Now start a test run of the application from ABAP Workbench as usual.
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.
Selecting the Web Dynpro Tool in the New
DebuggerWhen 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.
6.
Select one
of the three desktops in order to reconfigure it for debugging the Web Dynpro
application (see
Designing Work
Areas).
7.
The
right-hand edge of the debugger window has a bar of function icons. Choose the
Replace Tools icon:

8. In the next dialog box (New Tool) open the lowest node (Special Tools) and choose Web Dynpro.
9. Confirm the dialog box.
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:
