Quantcast
Channel: SCN : Blog List - All Communities
Viewing all articles
Browse latest Browse all 2548

Conditional Breakpoints

$
0
0

What's it all about

In some situations breakpoints let the program stop too often, when program parts containing breakpoints are processed very often, e.g. within framework code, or in a loop. Conditional breakpoints are a very useful and powerful possibility, to help yourself, focus and speed up your runtime and code analysis in such cases.

 

How to use

A condition can be set within the breakpoint properties. There are two possibilities to edit them:

 

1.) Context Menu on the breakpoint icon in the vertical ruler bar

ConditionalBreakpoints1.jpg

ConditionalBreakpoints2.jpg

 

2.) Select the breakpoint within the Breakpoint view

ConditionalBreakpoints3.jpg

After having set the condition a decorator is applied to the breakpoint's icon. The breakpoint's tooltip implies the condition, too.

ConditionalBreakpoints4.jpg

 

Further Details


The condition is not syntactically checked against the embedded program context - only a high level check is performed, to ensure the condition is formally correct and complete. Only runtime known variables and debugger defined expressions (like itab[1]) can be used - method calls or other built-in ABAP expressions cannot be used. You can find further details in the documentation.

During runtime, the condition may not be evaluable, e.g. due to reference to an unknown variable. In this case the breakpoint is effective, (i.e. the debugger stops), indicating that the condition is invalid.

In this example, an obviously invalid variable is used within the condition. This is made visible when the breakpoint is reached within the debugger:


ConditionalBreakpoints5.jpg

ConditionalBreakpoints6.jpg


Viewing all articles
Browse latest Browse all 2548

Trending Articles



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