DEBUG on or off

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

DEBUG on or off

cookxyz@gmail.com

Is it possible to turn DEBUG on or off during code execution?

Thanks


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: DEBUG on or off

cookxyz@gmail.com

No suggestions?? How bout this then: Is it possible to route all debug
output to a log file instead of sending it to output?

Here is my problem; I have a view that returns xml. If I turn debugging
on, it breaks the output.

Thanks


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: DEBUG on or off

Nate Abele
In reply to this post by cookxyz@gmail.com


[hidden email] wrote:
> Is it possible to turn DEBUG on or off during code execution?

DEBUG is a define, so no.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: DEBUG on or off

Grant Cox
In reply to this post by cookxyz@gmail.com


On Nov 6, 5:27 am, "[hidden email]" <[hidden email]> wrote:
> No suggestions?? How bout this then: Is it possible to route all debug
> output to a log file instead of sending it to output?
>

I personally use $this->log() for all of my debugging, as I don't want
anything additional output to the browser.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: DEBUG on or off

hypercubed
In reply to this post by Nate Abele

While it is true that you cannot change the DEBUG level on the fly
during in the middle of execution you can turn it on and off for a
session.  NoswaD outlines doing exactly that on his blog (
http://www.noswad.me.uk/MiBlog/SwitchConstants ).  Basically core.php
checks the session for variables that override the default defines.
Very cool... I think this should be  built into the cake core.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: DEBUG on or off

cookxyz@gmail.com

Thanks for the link hypercubed. That's what I was looking for. Seems
pretty simple now.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---