Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

Differences between watchpoints and conditional breakpoint & other debugging tricks

$
0
0

Watchpoints

Watchpoints are generally used when you need to find, at what point in time a variable is changed.

The debugger stops as soon as the variable is changed and any additional condition specified with the watchpoint is true.

 

The watchpoints can be set directly in the debugger in the tab “Break./Watchpoints”
subtab “Watchpoints”.

Watchpoint.png

 
While creating the watchpoint you can specify the variable you want to check and any additional condition which

must be able to be interpreted as either abap_true or abap_false. Some examples can be found by clicking on the

button next to the condition entry.

Watchpoint2.png

 

Please note that putting a watchpoint on an internal table will dramatically decrease the performance.

Internally a copy of the object is generated which leads to higher memory consumption.

 


Conditional Breakpoint (available as of SAP NetWeaver 7.0 EHP2)

Conditional Breakpoints should be used, if you know the area on which you need to focus on
during debugging, but this area is in eg. an loop over an huge table. Rather to step by step press F8

until you reached the desired entry you can set an conditional breakpoint.

 

To create a conational breakpoint goto the line you are interested in and right click on the existing breakpoint.

From the context menu you can then choose to create the condition.

Break.png

Then you can specify the condition you need:

Break2.png

The breakpoint will then only stop if the condition evaluates as abap_true.

 

 

 

Debugging Popups

From a popup you cannot start the debugger, as the command field is not avaiable. However there is a small workaround here.

All you need to do is to create a shortcut with type "System command".

Popup.png

 

Then you can always drag & drop the now created file to the popup which will enable the debugger.

If you want to be able to use the created file for all your systems, open it in Notepad and delete

everything expect the block beneath [Function].




Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>