Overview
Another extension of the EventBinding system is the @Debug annotation.
If you ever need to inspect the parameters of a handler and you don't want to stop the execution and re-run as debug, you can annotate the handler with @Debug. That will print a log with the parameters when the handler gets called.
Example:
@ViewHandler
@HasAttribute({"action", "index"})
@Debug
protected void contactsTable$click(@Attribute Actions action, @Attribute Integer index) {
ContactDetails contactDetail = contactDetails.get(index);
if (action.equals(Actions.CLICK)) {
placeManager.go(EditContactPresenter.class, contactDetail.getId());
} else {
if (selectionModel.isSelected(contactDetail)) {
selectionModel.removeSelection(contactDetail);
} else {
selectionModel.addSelection(contactDetail);
}
}
}Log:
@Debug com.google.gwt.sample.contacts.client.contacts.ContactsPresenter.contactsTable$click
@Debug----> action: SELECT
@Debug----> index: 14