X button in titlebar destroys window.
Remove debugger statement.