Broadcast on Broadcast off
The Documentation for Project Zero has moved. Please update your bookmarks to: http://www.projectzero.org/documentation/
Table of
Contents...
Hide

Project Zero Developer’s Guide

Concepts and components
Basic concepts overview
Event processing
Writing Java handlers
Writing Groovy handlers
Firing events
Global Context
Global Context reference
Application directory layout
Virtualized directories
Assemble
PHP
Features and configuration
Configuration
Debugging
Dependencies
Packaging
Application classpath
Logging and tracing
RESTful resources
RESTful documentation
File serving
Response rendering
Validators and validation
HTTP error handling
Calling a remote resource
Using the Connection API
Sending an email using EmailConnection
Configuring destinations
Configuring protocols
Configuring connection handlers
Creating a connection handler
Creating a custom protocol transport
Simple logging connection handlers
Protocol reference
Client programming with Dojo
Runtime options
Deployment modifications
HTTP configuration
SSL configuration
Proxy configuration
Extending the CLI
Security considerations
Authentication
OpenID authentication
Extending security
Security tokens
CSRF prevention support
Extending token support
Leveraging TAI
User service
File based user service
LDAP user service
Extending user service
Security Utilities
Leveraging XOREncoder
Extensions
Atom support
RSS support
JSON support
XMLEncoder
REST to SOAP extension
URIUtils
Developer Web tools
Database setup tools
Configuring data access
Common query patterns
Advanced query patterns
Update patterns
Local database transactions
Extending data access
Configuration vendor differences
PHP data access
Resource model
Configuring ZRM
Resource model declaration
Programmatic model API
HTTP REST API
A ZRM mini tutorial
Active content filtering support
Default filters
Custom filters
Runtime management
Management commands
Zero socket opener
Other extension modules
Amazon E-commerce service
Flickr service
WeatherZero forecast service
Wikipedia service
Reference
Zero command line interface
JavaDoc - Public API
JavaDoc - Public SPI
JavaDoc - All Classes

 

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:

  1. Right-click on the project and select Debug as>Project Zero Application.
  2. 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).
  3. 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.
  4. Now set a breakpoint in your application and fire a request using your browser so that you hit the breakpoint.
  5. 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.

    Eclipse Debug Perspective while debugging Simple Todo Tutorial

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:

Groovy Breakpoint Problem

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.

  Attachment Action Size Date Who Comment
jpg breakpoint_problem.JPG props, move 5.8 K 14 Dec 2007 - 13:55 ajtarter  
jpg debugGroovy.JPG props, move 117.7 K 13 Jul 2007 - 19:32 ajtarter Eclipse Debug Perspective running Groovy Todo
jpg groovyDebugM2.JPG props, move 163.6 K 23 Oct 2007 - 15:50 ajtarter  
r8 - 08 Feb 2008 - 04:22:38 - steveims
Syndicate this site RSS ATOM
Copyright 2007 © IBM Corporation | Privacy | Terms of Use | About this site