This debug tool is showing layout, block,model functions and queries executed behind each page load in magento. it might be useful for debugging.
http://www.magentocommerce.com/magento-connect/magneto-debug-8676.html
Go to CMS> Manage Pages interface
Insert the below code in content area
{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}
Go to catalog/product/view.phtml
<?php $categories = $_product->getCategoryIds(); ?> <?php foreach($categories as $i => $_category_id): ?> <?php $_category = Mage::getModel('catalog/category')->load($_category_id) ?> <a href="<?php echo $_category->getUrl() ?>"><?php echo $_category->getName() ?></a> <?php endforeach; ?>