I don't think this is a good solution, since you can just unlock the door by opening the console command prompt, select the door and type "Unlock" to unlock the door without having the key.
Instead of using the debug message, just use a regular message object if you want to display some text on the screen.

