Magento Forum

   
Debug features? 
 
aimos
Jr. Member
 
Total Posts:  18
Joined:  2007-12-28
 

I’m familiar with cakePHP so I know there where things happen. I’m noit with Zend or Magento by now, so I need hints where important things happen. For example does magento/zend “accept” my url or is it denied and replaced by 404 in some kind.

In my other work, where I happen to work with a stupid framework, I added this code to the somple redirect function we use:

function redir($link$call_file null$call_line null
{
  
die('<html><body>'.$call_file.' at '.$call_line.' likes to redirect to: <a href="'.$link.'">'.$link.'</a></body></html>');
  
session_write_close();
  
header('HTTP/1.1 303 See Other');
  
header('Status: 303 See Other');
  
header('Location: '.$link);
  die();
}

which I use so: redir(’/fooo/bar’, __FILE__, __LINE__);

and when the line with the “die(....)” is not a comment, redirects are stoped and require a manual klick. I can see then in which file and in which line a redirect was called. Sometimes a framework redirect serveral times and at the end shows you a blank page and you do not know what the funk happen.

Can someone helkp me with that in Magento?

I use the lastest update and would like to know:
- where the routes are build
- where the routes might match the one that is given
- the place where the Framwork has completet the list of to-load-modules
- where are redirects executed (to interrupt them)
- where are parameters parsed
- (for later coding) where can I see what SQL (after adding parameters) is send to the db

[EDIT]

I found via xdebug, that there is indeed a Mage::log() function, which writes a logfile, but it returns after the signiture, thus it does not work. hmmm
I tried to do a work around, but, well Zend botherd me and yelled about malformed date parameter, thus I put back “return;” hmmm

Would be nice if the next build has the log feature back(, again?).

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top