Add some debug code - Ref #458
Merge pull request #460 from joomla/debug-1

Add some debug code - Ref #458