问题
I am new to SAPUI5/OData development. So maybe this is a trivial question. To get a better feeling of what is going on I'd like to debug the OData requests executed from my application. How can I do this?
My environment:
- Eclipse with SAPUI5 tools
- Chrome for debugging
- Tomcat as Servlet Container.
I know how to start debugging tools in Chrome, I found the Network tab but what I wish to see is when the app is performing HTTP calls to the OData Service.
回答1:
To debug an SAPUI5 Application, you can run it in debug mode by passing a debug paramter in the URL as below. The console will log all the debug events
...index.html?sap-ui-debug=true
You can also attach Event handlers to your OData model if you want to setup a Javascript breakpoint at the trigger of an OData call as documented here
oModel.attachRequestCompleted
oModel.attachRequestSent
来源:https://stackoverflow.com/questions/42142344/debug-odata-requests