I don't script, but good job none the less

.
Why not have your script <b>toggle</b> the enable/disable debug window as well.
So if the user has it disabled, then this script will enable it. And upon exiting the debug window, the debug would be disabled again

.
Just a thought (don't even know if its possible).