在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…
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.
When the Debugger hits the correct row in the table, it stops.Link text step9g-table-view-pears