| | |
|
|
|
Debugging
This section describes the facilities available to help you debug Zero applications.
Debugging Groovy/Java in Eclipse
Debug support extends the base Eclipse support with a Global Context view and Groovy script debugging.
How to debug a Zero application in Eclipse
To debug you must answer "yes" to adding Groovy support so that your Groovy scripts are compiled. If you did not answer "yes" to this question before, you can right-click on the project and select Groovy>Add Groovy Nature. After that you can follow these steps to debug:
- Right-click on the project and select Debug as>Project Zero Application.
- After the debug session starts you should be switched to the Debug perspective and the application should be running on the configure HTTP port (default is 8080).
- You should also have a Global Context view showing in the top-right panel of the debug perspective. If this is not shown, then click Window>Show View>GlobalContext.
- Now set a breakpoint in your application and fire a request using your browser so that you hit the breakpoint.
- Below is a screenshot debugging the Simple Todo Tutorial. Notice that we are suspended on a line in the groovy script and that the Global Context view in the top-right presents the current state of the GC in tree form.
Issue with setting Groovy breakpoints
Some lines, assignments with a declaration, e.g. "def myDate = new Date()", seem to cause problems more than other statements. This is a known issue with the Groovy Eclipse plug-in - http://jira.codehaus.org/browse/GROOVY-2396. When you are in debug mode, you may notice the blue sphere icon in the ruler next to the line does not have a checkmark on it. This indicates the breakpoint is not properly installed and the process will not suspend on the line. See the subtle difference in the icons in the gutter of the Groovy editor:
Debugging PHP in Eclipse
The Project Zero PDT Integration plug-in provides a PHP debug target that lets you step through PHP lines while viewing PHP variables.
|
|
r8 - 08 Feb 2008 - 04:22:38 - steveims
|
|
|
| | |