Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find JavaScript Syntax Error

I'm just about to freak out. I currently have to work on a website that some other guy did and I am asked to maintain etc. It uses jQuery and a bunch of drupal modules. At some point i get some syntax error, so that some js works, and some does not. My big big problem is to find the syntax error. Neither Firebug, nor WebInspector give me decent information:

Error: uncaught exception: Syntax error, unrecognized expression: //

Yeah… that's it. No lines, no filename, no more hints. Has anyone an idea how to deal with this?

Thanks for any usefull hints.

like image 796
nocksock Avatar asked Feb 26 '23 06:02

nocksock


1 Answers

you might try a tool like the closure compiler, which will give warnings and errors for blocks of code. otherwise, it's brute force with alert('checkpoint'); to determine how far into your code you get before things break.

like image 98
lincolnk Avatar answered Mar 07 '23 14:03

lincolnk