Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #17909
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: How do you handle debug code? Removing from production versus conditional execution |
| Date | 2019-05-03 06:52 +0200 |
| Message-ID | <gj1vnuF9tnvU1@mid.individual.net> (permalink) |
| References | <a2740b73-91c2-4002-9573-d0204fe2bec7@googlegroups.com> |
On 03/05/2019 03.00, Ryan wrote:
> Perhaps an age old question, but how do you all deal with your debug code? Do you remove it before deploying to production, if so how do you make sure you remove it all without removing something important that will break your code?
Debug code can be good to keep for later us.
> Or do you use conditional execution such as:
>
> if ($_ENV['DEGUG'] == true) {
> var_dump($data);
> }
Except don't display the debug data on the page, always log it to a file
as the system log.
> If so what condition are you using? An environment variable like above, a constant defined elsewhere in a config file?
I tend to use a configuration value.
--
//Aho
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How do you handle debug code? Removing from production versus conditional execution Ryan <rbilesky@gmail.com> - 2019-05-02 18:00 -0700
Re: How do you handle debug code? Removing from production versus conditional execution "J.O. Aho" <user@example.net> - 2019-05-03 06:52 +0200
Re: How do you handle debug code? Removing from production versus conditional execution bm <bm.tempo999@gémail.com> - 2019-05-09 01:31 +0000
Re: How do you handle debug code? Removing from production versus conditional execution Martin Gregorie <martin@mydomain.invalid> - 2019-05-03 08:18 +0000
Re: How do you handle debug code? Removing from production versus conditional execution Martin Gregorie <martin@mydomain.invalid> - 2019-05-03 08:22 +0000
Re: How do you handle debug code? Removing from production versus conditional execution Arno Welzel <usenet@arnowelzel.de> - 2019-05-03 13:59 +0200
Re: How do you handle debug code? Removing from production versus conditional execution Jerry Stuckle <jstucklex@attglobal.net> - 2019-05-03 09:38 -0400
Re: How do you handle debug code? Removing from production versus conditional execution bm <bm.tempo999@gémail.com> - 2019-05-09 01:33 +0000
Re: How do you handle debug code? Removing from production versus conditional execution Angle <angleaaaaaaa@zohomail.eu> - 2023-04-22 22:06 -0700
Re: How do you handle debug code? Removing from production versus conditional execution doctor@doctor.nl2k.ab.ca (The Doctor) - 2023-04-23 12:03 +0000
Re: How do you handle debug code? Removing from production versus conditional execution legalize+jeeves@mail.xmission.com (Richard) - 2023-04-24 17:50 +0000
Re: How do you handle debug code? Removing from production versus conditional execution Jerry Stuckle <stuckle.jerry@gmail.com> - 2023-04-24 14:27 -0400
csiph-web