Debug Syntax Error Javascript
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads find syntax error in javascript with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack
Find Syntax Error In Javascript Online
Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign
Uncaught Syntax Error Javascript
up Can't find JavaScript Syntax Error up vote 3 down vote favorite 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
Javascript Syntax Error Code 0
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. javascript debugging syntax-error share|improve this question asked Sep 10 '10 javascript syntax error checker at 14:14 noxoc 2,91432555 I'm surprised that this is possible. Even if it was generated code that's being evaluated, eval() errors still are more informative than your example. –Reinis I. Sep 10 '10 at 14:30 add a comment| 4 Answers 4 active oldest votes up vote 3 down vote accepted 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. share|improve this answer answered Sep 10 '10 at 14:22 lincolnk 8,40932550 I recommend using Firebug's console.log() instead of alert(), because closing the alert windows is annoying. –Reinis I. Sep 10 '10 at 14:25 add a comment| up vote 2 down vote I believe Chrome's console pinpoints the line of the error.... Right-click on the page > Inspect element, then in the bottom right corner of the window that pops up, click on the red X icon, then click on the link for the error, enable Resource tracking if necessary... Also, put the code trough JSLint and correct the code accordingly ... share|improve this answer answered Sep 10 '10 at 14:29 Šime Vidas 88k31186312 add a comment| up vote 1 down vote I'd start by commenting out all but one javascript include at a time in the html, if possible (unless they're a tangled mess of dependencies). Other than that, can you try using a debugger to step
Learn Bootstrap Learn Graphics Learn Icons Learn How To JavaScript Learn JavaScript Learn jQuery Learn jQueryMobile Learn AppML javascript syntax error unexpected number Learn AngularJS Learn JSON Learn AJAX Server Side Learn SQL javascript syntax error expected expression got ' ' Learn PHP Learn ASP Web Building Web Templates Web Statistics Web Certificates XML Learn XML Learn javascript syntax error unexpected string XSLT Learn XPath Learn XQuery × HTML HTML Tag Reference HTML Event Reference HTML Color Reference HTML Attribute Reference HTML Canvas Reference HTML SVG Reference Google http://stackoverflow.com/questions/3685282/cant-find-javascript-syntax-error Maps Reference CSS CSS Reference CSS Selector Reference W3.CSS Reference Bootstrap Reference Icon Reference JavaScript JavaScript Reference HTML DOM Reference jQuery Reference jQuery Mobile Reference AngularJS Reference XML XML Reference XML Http Reference XSLT Reference XML Schema Reference Charsets HTML Character Sets HTML ASCII HTML ANSI HTML Windows-1252 HTML ISO-8859-1 HTML Symbols http://www.w3schools.com/js/js_debugging.asp HTML UTF-8 Server Side PHP Reference SQL Reference ASP Reference × HTML/CSS HTML Examples CSS Examples W3.CSS Examples Bootstrap Examples JavaScript JavaScript Examples HTML DOM Examples jQuery Examples jQuery Mobile Examples AngularJS Examples AJAX Examples XML XML Examples XSL Examples XSLT Examples XPath Examples XML Schema Examples SVG Examples Server Side PHP Examples ASP Examples Quizzes HTML Quiz CSS Quiz JavaScript Quiz Bootstrap Quiz jQuery Quiz PHP Quiz SQL Quiz XML Quiz × JS Tutorial JS HOME JS Introduction JS Where To JS Output JS Syntax JS Statements JS Comments JS Variables JS Operators JS Arithmetic JS Assignment JS Data Types JS Functions JS Objects JS Scope JS Events JS Strings JS String Methods JS Numbers JS Number Methods JS Math JS Random JS Dates JS Date Formats JS Date Methods JS Arrays JS Array Methods JS Array Sort JS Booleans JS Comparisons JS Conditions JS Switch JS Loop For JS Loop While JS Brea
About unsafe line breaks About potential typos in logical operators javascript syntax error When code is not in strict mode When new is used for side-effects Assume Browser NodeJS jQuery Development (console, etc.) New JavaScript features (ES6) Mozilla JavaScript extensions Older environments (ES3) Metrics version 2.9.3 About Documentation Install Contribute Blog