ADT debugger

8 篇文章 0 订阅

在sdn上看到了ADT debugger的几个设置,这几个功能在sapgui的时候,就非常有用。记录一下,以后备用!

I:Set breakpoint for an ABAP statement

To jump straight from your first breakpoint to the CASE statement:

1 Choose Run > ABAP Breakpoints > Add Statement Breakpoint…
Link text step8-add-statement-bp

2 Enter CASE, keep the setting Soft Breakpoint (so that you debug CASE statements only in your own class, not the whole stack), then choose OK.
在这里插入图片描述

Run the Debugger again by choosing F9.

II:Set watchpoint for variable with a condition

You may want to stop, not at a specific statement, but when a variable hits a specific value.To do this, run the Debugger again and proceed as follows:

1 For clarity, you may wish to deactivate your CASE statement breakpoint in the Breakpoints View.
在这里插入图片描述

2 In the Class Editor, select the field ls_product-suppliername and choose Set Watchpoint from the context menu.
在这里插入图片描述

3 In the Breakpoints View, choose the watchpoint and enter the condition LS_PRODUCT-SUPPLIERNAME = ‘AVANTEL’. Do not forget the single quotation marks.
在这里插入图片描述

4 If you switch to the Variables View, you can monitor the values of the variable as you step through the loop.

5 When the Debugger hits the correct row in the table, it stops.
在这里插入图片描述

6 When you are satisfied, terminate the Debugger.
You can define a wide range of complex conditions for breakpoints and watchpoint. For more information, see SAP Help Portal: SAP Cloud Platform: ABAP Development User Guide: Adding Conditions to Breakpoints

III:Set watchpoint for variable with condition for table row index

You can also specify a specific value for a different variable.

1 Start the Debugger again. Unlike a breakpoint, a watchpoint lasts only for the current Debugger session.
2 In the Class Editor, select ls_product-suppliername and choose Set Watchpoint again.
在这里插入图片描述

3 In the Breakpoints View, choose the watchpoint again. This time, enter the condition SY-TABIX = 4.
Link text step9c-watchpoint-sy-tabix

When the Debugger hits the correct row in the table, it stops.Link text step9g-table-view-pears

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值