getgrav / grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony
https://getgrav.org
MIT License
14.58k stars 1.41k forks source link

Grav Debugger Not Loading - Uncaught Syntax Error: Invalid Escape Sequence #3056

Closed michaelgriffindrake closed 3 years ago

michaelgriffindrake commented 4 years ago

Hey there!

I'm loving Grav so far. I wanted to check out the debugger to get some more insights into the theme I'm developing, but I can't get it to load due to a javascript syntax error.

Invalid Escape Sequence in phpDebugbar.addDataSet() call

Here's the specific offending part:

\"HTTP_HOST\" => \"//localhost:3000"\n  

Any thoughts on how to fix this?

rhukster commented 4 years ago

Never seen that before. PHPDebugBar uses JQuery, so can you ensure that is being loaded? Also what theme are you using?

michaelgriffindrake commented 4 years ago

I figured out what's causing the problem! I'm using BrowserSync to proxy the built in PHP server (using those just for development) and when I visit the non-proxied address localhost:9000 the PHPDebugBar loads just fine! Looks like the BrowserSync proxy is messing with that somehow. It makes sense that that would be the element not properly escaped as it's the server address.