Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
DRAFT, February 18, 2003, Page 102<br />
Watches: Fields can be watched for access or modification if the target JVM supports it. To create a<br />
watchpoint, select a field and then right click. A popup menu will allow you to set a modification or access<br />
watchpoint, or to remove them if they are set. A "Watch All" will set a watchpoint on all fields of the same<br />
signature as the selected field (including those in subclasses and superclasses of the field's object type).<br />
A simple "Watch" will set a watchpoint only for the selected field's object. Fields that are being watched<br />
for modification are shown with a black triangle pointing up in the center of the icon, those with an access<br />
watch are shown with the triangle pointing down, while those with both will have a black square. Setting a<br />
lot of watches can slow down debugging.<br />
19.6 Breakpoints<br />
Breakpoints can be set in the CSD windows using the "View" / "Breakpoints" menu, or the context menu.<br />
Only breakpoints in CSD Windows are active (when a CSD Window is closed, the breakpoints will go<br />
away, when one is opened, the breakpoints will become active. Breakpoints can be added or removed<br />
while the debugger is running.<br />
While the debugger is running, invalid breakpoints (breakpoints set on lines that do not contain<br />
executable code) are shown crossed out. If the class files for a particular source file can not be found, the<br />
breakpoints are shown with a slash through them. In order for this mechanism to work, the source file and<br />
associated class files must be located in the same directory.<br />
20 Complexity Profile Graph (CPG)<br />
The Complexity Profile Graph, or CPG, is a statement-level complexity or comprehensibility metric. Each<br />
segment, which corresponds roughly to a program statement, is assigned a complexity that is a weighted<br />
sum of:<br />
Reachability - the number of conditions that must be evaluated to reach the segment from outside<br />
of the enclosing method, function, or other top-level statement block. This is the traditional<br />
definition of reachability.<br />
Content - the log of the number of significant tokens in the segment. Some punctuation, such as<br />
block-enclosing braces or a statement-ending semicolon, is not considered significant. A pair of<br />
parenthesis is counted as one token.<br />
Breadth - the number of statements, methods, etc. in the innermost block containing the segment.<br />
Inherent - value assigned based on the inherent complexity of the innermost enclosing structure.<br />
For example, segments in switch or case statements are assigned an inherent complexity of 3.0.<br />
This reflects the view that some structure types are inherently more complex than others.<br />
The CPG window "Data Sets" menu allows any combination of these values and the total complexity to<br />
be viewed.<br />
Currently, the CPG is implemented only for Java and Ada.<br />
21 CPG Window<br />
The main section of this window shows the complexity values for the currently selected data sets. If the<br />
source is unedited, selecting segments in the CPG window will select the corresponding text in the source<br />
CSD window, and vice versa. The selection in the CPG window is shown as a yellow background. If the<br />
source is unedited, a black rectangle shows the segments that are currently visible in the CSD Window.