Breakpoints and watchpoints

 

            Programmers can add and remove breakpoints and watchpoints for pausing the program at points in the code, which correspond to pausing when certain parts of the graph and code are executing.  The functionality decisions related to adding and removing breakpoints and watchpoints were mainly motivated by mirroring Eclipse conventions for adding Java breakpoints and being externally consistent.

 

            Appearing in the left gutter of a text editor containing StreamIt code (Figure 3), line breakpoints, method breakpoints, and watchpoints can be added and removed from StreamIt code in various ways.  Line breakpoints, which are breakpoints that cause the program to pause right before a certain line of the code has executed, are the most general purpose of the three.  Line breakpoints can be added in four ways:  (1) double-clicking on the left gutter at a location horizontal to a line of code, (2) right-clicking on the left gutter and selecting “Add Breakpoint” from the pop-up menu that appears under the mouse (Figure 3), (3) holding the control and shift keys and then pressing the b key on the keyboard when the text editor’s cursor is at a line of code, and (4) selecting “Add Breakpoint” from the StreamIt drop-down menu at the top of the application (Figure 4) when the text editor’s cursor is at a line of code.  These four options are the same options available for Java line breakpoints.

 

Figure 3:  Left gutter of a StreamIt text editor showing line breakpoints, method breakpoints, and watchpoints added by the user.  A pop-up menu allows the user to add or remove line breakpoints.

 

Figure 4:  The StreamIt drop-down menu at the top of the application allows the user to add line breakpoints.

 

Likewise, four corresponding ways are available for removing line breakpoints:  (1) double-clicking on the left gutter where a line breakpoint is, (2) right-clicking on the left gutter and selecting “Remove Breakpoint” from the pop-up menu that appears under the mouse (Figure 4), (3) holding the control and shift keys and then pressing the b key on the keyboard when the text editor’s cursor is at a line of code that has a line breakpoint, and (4) selecting “Remove Breakpoint” from the StreamIt drop-down menu at the top-level of the application (Figure 4) when the text editor’s cursor is at a line of code that has a line breakpoint.  These four ways are the same ways that Java line breakpoints can be removed.

 

   

 

Figure 5:  A pop-up menu allows the user to remove line breakpoints (left).  The StreamIt drop-down menu at the top of the application allows the user to remove line breakpoints (right).

 

Method breakpoints, which are breakpoints that will cause the program to pause right before or after a certain method has executed, and watchpoints, which cause the program to pause when a variable has been modified or accessed, can be added in only one way:  selecting “Add Method Breakpoint” or “Add Watchpoint” from the StreamIt drop-down menu at the top of the application (Figure 6).  Method breakpoints can be removed in three ways, which correspond to (2), (3), and (4) for removing a line breakpoint (Figure 7).  Watchpoints can be removed in two ways, which correspond to (2) and (4) for removing a line breakpoint (Figure 7).  Again, this functionality mirrors the ways that Java line breakpoints can be removed.

 

   

 

Figure 6:  The StreamIt drop-down menu allows the user to add method breakpoints (left) and watchpoints (right).

 

 

   

Figure 7:  The StreamIt drop-down menu allows the user to remove method breakpoints (left) and watchpoints (right).

 

 

            Breakpoints and watchpoints can also be enabled and disabled (Figure 8).

 

Figure 8:  Disabled watchpoint, method breakpoint, and line breakpoints.

 

User attempts to add breakpoints or watchpoints at invalid lines of code are prevented by disabling the selections in the StreamIt drop-down menu and the left gutter’s pop-up menu (Figure 9).  Furthermore, the hot key codes and double-clicking are non-responsive at invalid lines.

 

    

 

Figure 9:  Disabled selections in the pop-up menu (left) and drop-down menu (right).