vcl: move debug function from window.cxx to debug.cxx

Change-Id: I9c3debcdda4b6ee943792e8799d436b097df2982