If you are debugging php code (either in the 'execute php code' of conditional actions, or in modified modules) then the devel module is invaluable.
Install using 'drush dl devel' then 'drush en devel' (you only need to enable this module and not the other two in the download).
Then set the Devel module permissions for the administrator user only (via http://test.openvpms.org/admin/by-module - you are working in the test system aren't you).
We do not have this module installed in production so it needs to be installed on the test system after test is cloned from production.
Where you want debug output, use the dpm() call - eg as follows:
and the output appears in the message portion of the screen as follows:
NOTE - the dpm() calls cause errors if the devel module is not installed. Hence these have to be removed from the code before moving it to production.