Show TOC

Logging and TracingLocate this document in the navigation structure

For debugging, you can use SAPUI5 logging, but also the* or $.sap.log.* functions log in your application code with different security levels.

The following code line issues a log statement with severity level error. The browser highlights this statement in red color and displays it like a JavaScript error:"This should never have happened!");

This code line issues a log statement with severity level information. The browser does not display this statement if your log console is set to filter for errors only:"FYI: something has happened");
Locating the Logger Output

The developer tools of Internet Explorer, Chrome, and Safari, as well as Firefox's Firebug extension offer a console API that you can use for logging. The log output is additionally directed to the console.

SAPUI5 Troubleshooting Logging Console
Using the Network Trace

If content misses in your application, check the network trace of your page for occurrences of errors like 404 (Page/file not found) or 500 (Internal server errors). This also tells you if an OData request has failed or if resources are not being loaded because of a wrong URL.

To start a network trace, for example, in Chrome, open the developer tools and switch to the Network tab. In the button bar at the bottom of this tab you can start and stop tracing. To see the network requests that are sent from your application, you have to start the trace and then reload the page. Once the loading has finished, you see a list of all requests that were triggered, along with the request status (and highlighting to show errors). Click on a request to view you further details, for example headers that were sent or the response that was retrieved.

SAPUI5 Troubleshooting Network Trace