Stop Error: Contao is not defined

Click on <span id="tog"> in Frontend -when Debug-Mode is active
(debugMode=true)- will create an Error in Firebug and/or Chrome's Dev-Tools:
("ReferenceError: Contao is not defined
http://blabla/
Line ...).
Every reload the debug-ouput is visible and need space, because the
cookie could not set with javascript. So a click on the green arrow is
demanded. Again and again...

Changing  Template::output() on line 366 from »Contao.path« to »/« will
solve the problem. Without lose the Issue
»https://github.com/contao/core/issues/5460« and the problem with
Cookies without set path.

I hope, it will help also other Developer in Frontend-Dev-Process.
Martin