Ability to disable panels in debug bar and the bluescreen

Notice: This thread is very old.
adrianbj
Member | 31
+
+4
-

Just wondering if you might consider making it possible to disable various panels in the debug bar. This would be useful for certain user roles.

Obviously this is already easy for third party panels, but I would like to be able to disable the System Info, Errors and Dumps panels. I would also need to be able to disable bluescreen error reporting.

I know this might seem like an unusual request given that Tracy is meant as a debug tool for developers, but it can be so much more with the ability to add custom info/tool panels meant for other site users/editors, especially during development. To this end it would also be nice to be able to remove the “TRACY” from the bar as it will not really be meaningful for this type of user.

I have several custom Tracy panels that would be useful for non developer users – one in particular allows the user to load different PHP template files for the current page – this allows multiple versions of code for a page to be tested easily. As a developer I use this for testing changes on live sites, but I would like clients to be able to use this panel to view the new version as it is being developed without affecting regular users. This is of course just one use case, but I think it shows how Tracy can be used for more than just debugging and error reporting and can be used a development tool.

Thanks for considering.

adrianbj
Member | 31
+
0
-

I see two thumbs up for this! Is there any interest from the dev team? Would you consider adding this functionality, or would you accept a PR?

David Grudl
Nette Core | 8228
+
0
-

Tracy for different type of user (user roles) is interesting idea and I think it can be useful. (Low level) Disabling of system panels I contrary see as unnecessary.

GEpic
Member | 566
+
0
-

David Grudl wrote:

Tracy for different type of user (user roles) is interesting idea and I think it can be useful. Disabling of system panels I contrary see as unnecessary.

For example for translations and translators. I know that there is option to show Tracy for given IPs, but the possibility to show Tracy for logged users with ‘dev’ rights, and hide Tracy for non-logged users would be fine.

adrianbj
Member | 31
+
0
-

Tracy for different type of user (user roles) is interesting idea and I think it can be useful.

I don't honestly need this part – I am already handling it via the code that instantiates Tracy. Maybe it would be useful to those who use Tracy along with the rest of the Tracy framework though.

(Low level) Disabling of system panels I contrary see as unnecessary.

Do you have any thoughts on how to disable system panels at a higher level?

I think there are lots of other reasons to disable certain parts of Tracy. Right now for example I would like to be able to disable the Bluescreen for a custom console panel which processes code via AJAX – I am handling the errors in my own custom handler, but recent changes to the Tracy core now means that the Bluescreen is hijacking my error handler for syntax errors. I still want the debug bar enabled as the code submitted via the console can trigger various other panels, so I can't simply disable the debug bar completely.

I think some flexibility in this area would be really useful. Thanks for reconsidering. Can you see any downsides to implementing this?

tpr
Member | 55
+
0
-

+1 for the request

adrianbj wrote:

but recent changes to the Tracy core now means that the Bluescreen is hijacking my error handler for syntax errors

This sounds me like a regression.