Some students report seeing a common error message when running jGRASP on their Mac, particularly when using the DrawingPanel. To tell jGRASP to number the lines of your program, press Ctrl-L or click View, Line Numbers. Line numbers are useful so that you can find the line where a compiler error occurs. To change this and make the files open in larger windows, click the third button on the bottom left of the jGRASP window. JGRASP has as annoying default setting that causes newly opened files to appear in small box windows. The bracket, along with its matching partner, will highlight in gray. To see which bracket matches a particular bracket in your program, hold the Ctrl key and hover your mouse over that bracket. jGRASP has a useful feature that matches pairs of brackets to help you track down these kinds of bugs. Students will have too many, too few, or just have them in the wrong places. As you step through the code, if a variable's value changes, it will turn red on the left. If you're running a program that uses variables, all of the variables' values will be shown on the left as well. The result is the following:Īny output that results from the code as it is being run will appear in the bottom console pane. For example, we'll Step In to the call of drawEgg from our previous example. The most useful of these buttons is Step In, so if you only learn to use one of them, make it that one. Auto Step: When you turn on this button and then press Step Over/In/Out, it will repeatedly perform that action.Resume: Tells the program to continue executing until it is finished, or until another breakpoint is encountered.Run to Cursor: Executes lines until reaching the line where your keyboard cursor is sitting.(If you click this while in your main method, it runs the rest of your entire program.)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |