Stop Error: Contao is not defined

Click on <span id="tog"> in Frontend -when Debug-Mode is active
(debugMode=true)- will create an Error:
("ReferenceError: Contao is not defined
http://c3.2.x.dev/
Line 748).
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.

Maybe it will help also other Developer in Frontend-Dev-Prozess.