docs

Diagnostics

The Diagnostics window available in OpenUI5 is a support tool that runs within an existing OpenUI5 app.

To open Diagnostics, use the following shortcuts: [CTRL] + [SHIFT] + [Alt] /[Option] + [S] in the app.

Note:

Depending on your app, additional features may be available. Check the sections below for more information.

Technical Information

In this section you can view the technical details of the app and turn on the debug sources. It provides the same features as the Technical Information dialog. Additionally, the Technical Information dialog is available on mobile devices that support multi-touch. For more information, see Technical Information Dialog.

In addition, you can see the following information:

Control Tree

The control tree shows all controls that are used in the app. You can select controls either directly in the app by choosing [CTRL] + [SHIFT] + [Alt] and clicking on the control, or by selecting the control in the control tree.

The following functions are available in the dialog:

Breakpoints on the Object Level

In the Control Tree of the Diagnostics window, you can set breakpoints on the object level.

  1. Open the Control Tree view of the Diagnostics window.

  2. Select a control in the tree.

    You can also press and hold [Ctrl] + [Shift] + [Alt] and select a control in your app to select it in the tree.

  3. Select the Breakpoints tab on the right.

  4. From the dropdown list, select the method for which you want to set the breakpoint and choose Add breakpoint.

    The selected methods are listed below the dropdown list.

  5. Open the developer tools of your browser. Whenever the selected methods are called for any instance on the control, the code execution is paused in the debugger.

  6. To remove a breakpoint, select the red x.

Debugging

The Diagnostics window provides you with the following features that help you when debugging your app:

Switching the OpenUI5 Version


Open the Diagnostics window with the shortcut [CTRL] + [SHIFT] + [ALT] + [S].

At the top of the Debugging view, you can configure a custom URL from which the application should load OpenUI5 the next time that the app opens.

Either select a known OpenUI5 installation from the dropdown box, or enter a different URL that points to the sap-ui-core.js file within a complete OpenUI5 runtime.

Once you have entered the URL, press Activate Reboot URL. When you then reload the application page, the application loads OpenUI5 from the alternative URL. This only happens for the next single reboot; after that, OpenUI5 is loaded again from the standard URL referenced within the app.

This feature can be used to test an application against a newer or older version of OpenUI5 as part of compatibility testing, or for verifying a bug fix or regression.

Breakpoints on the Class Level

In the Debugging section of the Diagnostics window, you can set breakpoints on the class level.

  1. Open the Debugging view of the Diagnostics window.

  2. Select a class from the dropdown list or enter the name of the class and choose Add Class.

    The selected class is now visible below the dropdown list.

    The number next to the method name shows the number of methods that belong to the class and the number of methods for which a breakpoint is set.

  3. Select the class. On the right side of the view, you can now select methods of the selected class from a dropdown list.

  4. From the dropdown list, select the method for which you want to set the breakpoint and choose Add breakpoint.

    The selected methods are listed below the dropdown list.

  5. Open the developer tools of your browser. Whenever the selected methods are called for any instance of the selected control, the code execution is paused in the debugger.

    In the call stack you find the method for which you set a breakpoint.

  6. To remove a breakpoint, select the red x.

XML View and Templating Support Tools

This section of Diagnostics shows the code of the loaded XML view exactly as you would see it in your development environment. This way, you can check and test your XML code without the need to switch environments. If your app is connected to a remote service or a back-end system, you can also view the XML metadata.

Before you can use this feature, restart your app in Support Mode (with the sap-ui-support=true URL parameter added to the URL or your app).


XML Metadata

You can display XML metadata by expanding the related nodes in the tree. This helps you to better understand how the data is stored in the back end and which properties it has. This is especially important when investigating binding issues. ![](/docs/04_Essentials/images/loio449fff480c114f278f2aefcdf3fb6c09_LowRes.png) XML metadata of a service with three main entity sets: `Product`, `ProductCategory`, and `FeaturedProduct`

XML Code

When you expand an XML view in the tree, you can display the XML code. You can choose the following options for this view: - You can choose which kind of IDs you want to see: - IDs as they are in the DOM \(option *Show Real IDs*\) - IDs as they are defined in the XML view \(option *Show XML View ID*\) If no stable ID is defined in the view, the ID tag is empty \(`id=" "`\), if there is an ID, the value is set to `true` \(`id="true"`\). - You can show or hide the namespaces to improve readability of the code. ![](/docs/04_Essentials/images/loioe95cf067be054a2591e979a5047e7322_LowRes.png)
When you select a control in the code, the following information is displayed: - Name of the control with a link to the API Reference and its ID in the DOM tree - Instances that are **cloned** in the control with their IDs - Attributes and properties of the control with their values Similar to the *Control Tree* section of *Diagnostics*, you can change those values here for testing purposes. - Methods that are available for the control. > ### Note: > When you select, for example, an aggregation, you see the name of the control which has this aggregation or the name of the parent. ![](/docs/04_Essentials/images/loio8b3a0c29ca8b42ee847bfcf739bcfd56_LowRes.png)

Visualizing User Interaction

With this feature, you can collect and visualize the performance data collected for the interaction steps in an easy and intuitive way. In addition, you can enable statistics for OData calls that give you information about the app processing time taken by the OData back end.


Activation

You can start the interaction data collection in the following ways:


Output


Additional features

Related Information

Interaction Tracking for Performance Measurement