调试OData请求 [英] Debug OData requests

查看:128
本文介绍了调试OData请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是SAPUI5/OData开发的新手.因此,也许这是一个琐碎的问题.为了更好地了解正在发生的事情,我想调试从我的应用程序执行的OData请求.我该怎么办?

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?

我的环境:

  • 带有SAPUI5工具的Eclipse
  • Chrome用于调试
  • Tomcat作为Servlet容器.

我知道如何在Chrome中启动调试工具,我找到了[网络]标签,但我希望看到的是应用程序何时对OData服务执行HTTP调用.

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.

推荐答案

要调试SAPUI5应用程序,可以通过在URL中传递调试参数(如下所示)以调试模式运行它.控制台将记录所有调试事件

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

如果要在OData调用的触发器上设置Java断点,也可以将事件处理程序附加到OData模型,如

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

这篇关于调试OData请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆