DebugLayer not shown when activated by GUI button

I am adding a GUI button to my scene that shows or hide the debug layer when clicking on the button (repro However when I click on it the debug layer is not shown, nor hidden. I am sure I am missing something.


isVisible is a function so it should be isVisible()

arrg, I feel dumb!