Overview
KB
Learn PHP
PHP techniques
PHP Smarty Functions
PHP Web Email
Secure development
PHP Security Scenario
SSH and SFTP
PHP Smarty
PHP Smarty Modifiers
PHP Smarty Caching
PHP Smarty Misc
CakePHP
Zend Framework
PHP basics

CakePHP Development

How to debug CakePHP view files

Oh, these .thtml files again! Sure, there is plenty of PHP code in them to debug. How can you debug non-php files? The power of NuSphere's PHP Debugger comes to the rescue once again. Even though view files are not technically php files, you can debug them if you associated them with PHP in Files->Settings->Associations as described earlier in this tutorial. You can certainly set the Association now as well and simply go ahead and set the break point in any .thtml file on the line where php is executed - using F5 shortcut or Toggle Breakpoint Pop-up Menu item.
The next time this break point is hit - for example when the view file is included in php via require instruction, the debugger will stop there and you can debug the code in .thtml file as you would normally debug PHP file. For example, you can see the whole call stack leading to the inclusion of your edit.thtml file: CakePHP PHP debugger thtml files

Not quite simple, don't you think? The convenience of using PHP Frameworks is paid for by the complexity of these frameworks.

Article continues:  <<previous page  next page>>

 Download NuSphere PHP IDE

Download a free trial of the fast PHP EDitor and robust Integrated Development Environment for PHP.

 Buy NuSphere PhpED® now

Best PHP Editor and complete PHP IDE.
NuSphere PhpED 21.0 is available from our online store front.

 Special Team4 Offer

Get 4 copies of PhpED for the price of 3!

Optimum solution for development teams.
PhpED 21.0 Team4
Need more than 4 licenses? Contact Us for more quantity discounts, please use "Ordering/Payment issue" subject on the form.
"To be honest its bloody awesome, I have looked at loads of PHP editors and this is THE only one that actual works straight out of the box!!! Brilliant, well done."
Andrew Breward,
Director of Technology
caboodal.com