Automatically turn off SC Debug on deploy setting

I tend to leave Server Connect Debug on while developing.
I am conscious that I often forget to turn it off when I deploy to Production which is a security risk

It would ne really useful; to be able to either:

  1. Set the SC debug Flag according to target
    or
  2. Have a setting to allow debug to be turned off automatically when hitting deploy

Make it dynamic so it can be bound to environment variables?

That would be a possibility yes, but at the moment we only have this:

image

So we have to remember to turn off when deploying to production.

Allowing settings by target would probably be the best in my opinion but auto off on deploy would work for me also.
That would force it off on deploy for securirty but it could be activated again manually if needed, if you forget to deactivate it then deploying your solution would do it for you anyway.

1 Like

Wouldn’t the most logical way be based on target type? Development or Staging = Debug On, Production = Debug Off.

As long as there is the ability to turn on manually.
Due to minor server differences sometimes an action can work perfectly on the development server but fail on Production. It is essential it can be turned on if needed in such a case

This is actually already target specific. I have my production target off, and all others on. Actually Everything in that panel is target specific—just not labeled as such.

1 Like

Whoa, you’re right! I actually already had my staging target set to debug on and the production target to be off.

:clap:

So it is, not sure if i should be happy or worried now, So many sites where I may have left it on on production as I only switched it off in development settings. Kind of a solution which leads to more issues but at least I know now and know why I am seeing error output in places where i didn’t expect it to happen as debug seemed to be off

Maybe the FR should be to just change the panel title to include the target name (should also be done on global tabs). I recall asking for this before, but maybe that was in my head. :grinning:

4 Likes

Yes, that would be the simple solution. We know now but new users may be unaware and have similar confused thoughts (my brain tends to be confused at the best of times)

Yepp I actually have it on in production. Didn’t even know that it was a security risk tbh :sweat_smile: