Debugging in CakePHP framework |
Site Admin
|
Most if not all templates for php are not written in php. In other words, they can't be executed as scripts and therefore you can not debug them.
You may wan to consider template as a macro-extension to a markup language (HTML/XHTML) |
||||||||||||
_________________ The PHP IDE team |
|
Dmitri,
Thanks for your reply. I've given up on the prospect of debugging the view (template) files. I'd be ecstatic if I could simply set breakpoints within the controllers (logic) or models (db access). Both are defined as classes and I'm sure they're instantiated, but for some reason, I never hit any breakpoints. I can only imagine that I'm missing some fundamental phped oo debugging paradigm. I can't imagine, however, that I'm the only person that would like to use your product with cakephp? Thanks again Dmitri for your help! - tdo |
||||||||||||
|
Site Admin
|
I'd recommend you to read FAQ forum running on this board and in particular please take a look at the post entitled "how to run debug session" (or something like this)
|
||||||||||||
_________________ The PHP IDE team |
Debugging Cake |
|
I was able to debug and step through the codes on my controller using PHPed on cakephp by setting a breakpoint at the dispatcher.php file as listed below:
function _invoke (&$controller, $params, $missingAction = false) { $this->start($controller); $classVars = get_object_vars($controller); if ($missingAction && in_array('scaffold', array_keys($classVars))) { uses(DS.'controller'.DS.'scaffold'); return new Scaffold($controller, $params); } else { $output = call_user_func_array(array(&$controller, $params['action']), empty($params['pass'])? null: $params['pass']); //->>>>I placed a breakpoint in to this line and step in through it } if ($controller->autoRender) { $output = $controller->render(); } $controller->output =& $output; $controller->afterFilter(); return $controller->output; } Now, I run into a little bit of problem on parameter passing. I tried passing a GET parameter variable and it works but somehow I don't know why the variable is not passed using POST. So I tried to trace the problem by simulating a POST variable at the main cakephp webroot. Here's my test case: @cakephp index.php (main webroot) 32: $val = $_POST; // I just placed this line for me to evaluate the parameter that get's passed if any 33: if (!defined('DS')) { 34: define('DS', DIRECTORY_SEPARATOR); 35: } $_POST value is null but If I pass a GET query the data get's passed. I can't find any reason why. Is this a Phped bug? I used PHPEd's internal Parameters form to pass my variables. |
||||||||||||
|
Site Admin
|
Please note that POST will work if you use INTERNAL (embedded) internet explorer and only.
On the other hand, you can use Debugger Toolbar available for FireFox and Internet Explorer and check trigger debugger on next POST, then click submit on the form. |
||||||||||||
_________________ The PHP IDE team |
cakephp debugging problem with POST |
|
Thanks for the Info.. Will check your tip.
|
||||||||||||
|
Debugging in CakePHP framework |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by