How to Step Through a Grails App Using NetBeans
Stepping through the Grails app in the Java Netbeans programming software means you run the code in the Netbeans debugger. The debugger lets you set breakpoints and step through lines of code one line at a time. The process shows you the current variable's value and you step through the code as slow as you need to to find any errors in the code.
Instructions
-
-
1
Open the Netbeans software and open the Grails project you want to step through. Double-click the first project file with your start-up source code.
-
2
Click the first line of code in the left panel. Notice a red dot is created. This is a breakpoint, which means the code execution stops here and waits for you to press the key to step through to the next line.
-
-
3
Click the "Run" menu item and select "Debug Main Project." The debugger runs to the breakpoint. Click "Step Into" in the toolbar. The code jumps to the next code line item.
-
4
Hover the mouse over the variable in the next line item. Notice the debugger shows you the value of the variable. You use this feature to evaluate for any errors in the code.
-
5
Click "Step Into" until you reach the end of the code. If the debugger sees any errors, a message box displays the error.
-
1