Fixed debugPanel installation when `#debug` is defined
Moved debug draw operation to the debugPanel