Enable/Disable Debug mode with PHP

Is there a way to enable / disable debug mode in php, without having to regenerate files and upload?
Alternatively, can I manually edit a file to enable / disable?
Big project, takes a long time to regenerate, upload to server each time I want to turn it on and off.
Thx.

You may simply change the settings for debugging in the src/config.php, or you may simply generate the src/config.php and upload it.

Thanks so much! Looks like you could also use this to enable and disable maintenance mode quickly. Really appreciate the help.