Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
c9b0f8cca852443f9b8d3bf8ba5626ab
view on: demo kit nightly build | demo kit latest release
Debugging
When developing apps, searching for bugs is an inevitable part of the process. To analyze
an issue, you can use the developer tools of your browser and built-in OpenUI5 tools. In
this section, we give an overview of the OpenUI5 tools you can use when debugging. To
learn more about the developer tools of your browser, check the documentation of the
browser.
If you only want to load the debug sources for specific packages, you have the following
options:
• Add the module names to the sap-ui-debug URL parameter, separated by a comma.
For example, sap-ui-debug=sap/ui/core/Core.js,sap/m/InputType.js loads the
debug sources for the sap.ui.core.Core and sap.m.InputType libraries.
• Choose the Select specific modules link in the Technical Information Dialog.
After reloading the page, in the Network tab of the browser’s developer tools you can see
that the controls and framework assets are now loaded individually and have a -dbg suffix.
These are the source code files that include comments, the uncompressed code of the app,
and the OpenUI5 artifacts.
Choose * Ctrl O * (Windows) or * Command O * (macOS) and type the name of an OpenUI5
artifact to view its source code in debug mode.
Note: Turning on debug sources also increases the log level. For more information, see Logging and Tracing.
To improve performance, you must deactivate the debug sources once you’re done with debugging.
Switching the OpenUI5 Version
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.
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.
4. From the dropdown list, select the method for which you want to set the breakpoint
and choose Add breakpoint.
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.