Poll: Would you find a globally enabled profiler helpful?
You do not have permission to vote in this poll.
Yes, I would like to see a global switch for enabling the profiler
57.14%
8 57.14%
No, it is fine as it is.
42.86%
6 42.86%
Total 14 vote(s) 100%
* You voted for this item. [Show Results]

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enable profiler globally

#12
(04-29-2015, 03:32 PM)ivantcholakov Wrote: If it is introduced, maybe this global option should be not enforced in the same way for AJAX requests that output in non-HTML formats. For example, if an AJAX request returns in JSON format, the additional output from the profiler will damage the result, the client will be not able to parse it.

Yes that is true, and a good point. In fact also true of normal AJAX requests too. And how would that be identified? From the header? That is probelmatic in itself I suspect.

From above
(04-29-2015, 06:07 PM)InsiteFX Wrote: This is how I do it with a profiler.php config file.

That is a really neat and clever suggestion. Then I can include or not include in controllers I use for ajax and other things where the profiler would not be required. I really like this approach. Simple, clear and effective. Thank you. At the moment I just include the profiler line in all my controllers but commented out and I uncomment when I need it. However going to all the individual controllers (especially in a complicated routing site) is a pain. Your approach will work superbly for me, thank you again.

Anyway, given all the points raised in earlier posts, perhaps enabling the profiler globally just has too many complications and inherent problems. I would still like to have it as a config or autoload global variable, but I can see now why maybe the CI developers would prefer not to do it.

The debugging help provided by the profiler is just so useful and so powerful that I thought it would be handy to turn it on for all pages when needed and off for all pages when a site goes live globally.

Thanks for all the replies though.

Best wishes,

Paul
Reply


Messages In This Thread
Enable profiler globally - by PaulD - 04-29-2015, 02:56 AM
RE: Enable profiler globally - by mwhitney - 04-29-2015, 06:40 AM
RE: Enable profiler globally - by gadelat - 04-29-2015, 11:23 AM
RE: Enable profiler globally - by CroNiX - 04-29-2015, 01:46 PM
RE: Enable profiler globally - by gadelat - 04-29-2015, 01:50 PM
RE: Enable profiler globally - by PaulD - 04-29-2015, 01:58 PM
RE: Enable profiler globally - by ivantcholakov - 04-29-2015, 03:32 PM
RE: Enable profiler globally - by ivantcholakov - 04-29-2015, 03:36 PM
RE: Enable profiler globally - by ivantcholakov - 04-29-2015, 04:38 PM
RE: Enable profiler globally - by InsiteFX - 04-29-2015, 06:07 PM
RE: Enable profiler globally - by John_Betong - 04-29-2015, 07:22 PM
RE: Enable profiler globally - by PaulD - 04-30-2015, 05:17 AM
RE: Enable profiler globally - by PaulD - 04-30-2015, 05:15 AM
RE: Enable profiler globally - by ivantcholakov - 04-30-2015, 10:52 AM
RE: Enable profiler globally - by InsiteFX - 05-01-2015, 01:12 AM
RE: Enable profiler globally - by RWCH - 05-01-2015, 06:08 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.