Changing isDebugMode(), adding isDebugOutputEnabled()

We changed how debugging works in 5.3, previously you needed both debugging enabled and a template defined, but you can now enable debugging without needing a template (just viewing the logs in the admin or via the API).

But, isDebugMode() still checks for a template too.

I would like to change that to only return whether debugging is enabled, it’s stricter so I don’t see it being so risky, but happy to hear feedback on the idea.

We could then add a new function isDebugOutputEnabled() which behaves like isDebugMode() currently does?

Thoughts?

2 Likes

Maybe getDebugTemplates() as a companion? But isDebugTemplateEnabled() as I dont think we refer to it as “debug output” in the admin?

1 Like

been thinking about this, maybe we could just keep it simple and add ip address as an optional argument?

isDebugMode(); // is debugging enabled
isDebugMode("*"); // is debugging enabled with a global template
isDebugMode("192.168.0.1"); // is debug enabled for my router :)