Debug OData requests

安稳与你 提交于 2019-12-23 04:26:50

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!